File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
pfSense-pkg-NetBird/files/usr/local/pkg/netbird Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ function netbird_resync_config()
3838 return ;
3939 }
4040
41- if (!empty ($ _POST ['wireguardport ' ])) {
42- $ config ['WgPort ' ] = (int )$ _POST ['wireguardport ' ];
41+ $ settings = config_get_path ('installedpackages/netbird/config/0 ' , []);
42+ if (!empty ($ settings ['wireguardport ' ])) {
43+ $ config ['WgPort ' ] = (int )$ settings ['wireguardport ' ];
4344 }
4445
4546 $ config_map = [
@@ -54,9 +55,9 @@ function netbird_resync_config()
5455 'rosenpasspermissive ' => ['RosenpassPermissive ' , true ],
5556 ];
5657
57- foreach ($ config_map as $ post_key => [$ json_key , $ enabled_val ]) {
58- if (array_key_exists ($ post_key , $ _POST )) {
59- $ checked = $ _POST [ $ post_key ] === 'on ' ;
58+ foreach ($ config_map as $ key => [$ json_key , $ enabled_val ]) {
59+ if (array_key_exists ($ key , $ settings )) {
60+ $ checked = $ settings [ $ key ] === 'on ' ;
6061 $ config [$ json_key ] = ($ checked === $ enabled_val );
6162 }
6263 }
You can’t perform that action at this time.
0 commit comments