File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
api/src/unraid-api/unraid-file-modifier/modifications Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,10 @@ export default class RcNginxModification extends FileModification {
3939API_UTILS="/usr/local/share/dynamix.unraid.net/scripts/api_utils.sh"`
4040 ) ;
4141
42- newContent = newContent . replace (
43- '# create listening ports' ,
44- `# check if remote access should be enabled
42+ if ( ! newContent . includes ( 'check_remote_access()' ) ) {
43+ newContent = newContent . replace (
44+ '# create listening ports' ,
45+ `# check if remote access should be enabled
4546check_remote_access(){
4647 # Check if connect plugin is enabled using api_utils.sh
4748 if [[ -f $API_UTILS ]] && $API_UTILS is_api_plugin_enabled "unraid-api-plugin-connect"; then
@@ -58,8 +59,9 @@ check_remote_access(){
5859 return 1
5960}
6061
61- # create listening ports`
62- ) ;
62+ # create listening ports`
63+ ) ;
64+ }
6365
6466 newContent = newContent . replace (
6567 `if [[ -L /usr/local/sbin/unraid-api ]] && grep -qs 'wanaccess="yes"' $MYSERVERS && ! grep -qs 'username=""' $MYSERVERS; then` ,
You can’t perform that action at this time.
0 commit comments