@@ -545,7 +545,7 @@ Please DO NOT copy files manually into ioBroker storage directories!`
545545                    console . log ( `Backup created: ${ filePath }  ) ; 
546546                    await  this . resetDbConnect ( ) ; 
547547
548-                     console . log ( `updating conf/${ tools . appName }  ) ; 
548+                     console . log ( `updating conf/${ tools . appName . toLowerCase ( ) }  ) ; 
549549                    fs . writeFileSync ( `${ tools . getConfigFileName ( ) }  ,  JSON . stringify ( oldConfig ,  null ,  2 ) ) ; 
550550                    fs . writeFileSync ( tools . getConfigFileName ( ) ,  JSON . stringify ( newConfig ,  null ,  2 ) ) ; 
551551
@@ -566,7 +566,7 @@ Please DO NOT copy files manually into ioBroker storage directories!`
566566                            `New Database could not be connected. Please check your settings. No settings have been changed.${ COLOR_RESET }  
567567                        ) ; 
568568
569-                         console . log ( `restoring conf/${ tools . appName }  ) ; 
569+                         console . log ( `restoring conf/${ tools . appName . toLowerCase ( ) }  ) ; 
570570                        fs . writeFileSync ( tools . getConfigFileName ( ) ,  JSON . stringify ( oldConfig ,  null ,  2 ) ) ; 
571571                        fs . unlinkSync ( `${ tools . getConfigFileName ( ) }  ) ; 
572572
@@ -587,7 +587,7 @@ Please DO NOT copy files manually into ioBroker storage directories!`
587587                        if  ( exitCode )  { 
588588                            console . log ( `Error happened during restore. Exit-Code: ${ exitCode }  ) ; 
589589                            console . log ( ) ; 
590-                             console . log ( `restoring conf/${ tools . appName }  ) ; 
590+                             console . log ( `restoring conf/${ tools . appName . toLowerCase ( ) }  ) ; 
591591                            fs . writeFileSync ( tools . getConfigFileName ( ) ,  JSON . stringify ( oldConfig ,  null ,  2 ) ) ; 
592592                            fs . unlinkSync ( tools . getConfigFileName ( )  +  '.bak' ) ; 
593593                        }  else  { 
@@ -612,7 +612,7 @@ Please DO NOT copy files manually into ioBroker storage directories!`
612612                console . log ( '' ) ; 
613613            } 
614614        } 
615-         console . log ( `updating conf/${ tools . appName }  ) ; 
615+         console . log ( `updating conf/${ tools . appName . toLowerCase ( ) }  ) ; 
616616        fs . writeFileSync ( tools . getConfigFileName ( ) ,  JSON . stringify ( newConfig ,  null ,  2 ) ) ; 
617617        return  EXIT_CODES . NO_ERROR ; 
618618    } 
@@ -626,10 +626,10 @@ Please DO NOT copy files manually into ioBroker storage directories!`
626626                config  =  fs . readJsonSync ( tools . getConfigFileName ( ) ) ; 
627627                originalConfig  =  deepClone ( config ) ; 
628628            }  else  { 
629-                 config  =  fs . readJsonSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName }  ) ) ; 
629+                 config  =  fs . readJsonSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName . toLowerCase ( ) }  ) ) ; 
630630            } 
631631        }  catch  { 
632-             config  =  fs . readJsonSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName }  ) ) ; 
632+             config  =  fs . readJsonSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName . toLowerCase ( ) }  ) ) ; 
633633        } 
634634
635635        const  currentObjectsType  =  originalConfig . objects . type  ||  'jsonl' ; 
@@ -1135,12 +1135,9 @@ require('${path.normalize(__dirname + '/..')}/setup').execute();`;
11351135        // only change config if non existing - else setup custom has to be used 
11361136        if  ( ! fs . existsSync ( configFileName ) )  { 
11371137            isCreated  =  true ; 
1138-             if  ( fs . existsSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName }  ) ) )  { 
1139-                 config  =  fs . readJsonSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName }  ) ) ; 
1140-             }  else  { 
1141-                 config  =  fs . readJsonSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName . toLowerCase ( ) }  ) ) ; 
1142-             } 
1143-             console . log ( `creating conf/${ tools . appName }  ) ; 
1138+             config  =  fs . readJsonSync ( path . join ( CONTROLLER_DIR ,  'conf' ,  `${ tools . appName . toLowerCase ( ) }  ) ) ; 
1139+ 
1140+             console . log ( `creating conf/${ tools . appName . toLowerCase ( ) }  ) ; 
11441141            config . objects . host  =  this . params . objects  ||  '127.0.0.1' ; 
11451142            config . states . host  =  this . params . states  ||  '127.0.0.1' ; 
11461143            if  ( useRedis )  { 
@@ -1167,7 +1164,10 @@ require('${path.normalize(__dirname + '/..')}/setup').execute();`;
11671164            try  { 
11681165                // Create 
11691166                if  ( 
1170-                     __dirname . toLowerCase ( ) . replace ( / \\ / g,  '/' ) . includes ( `node_modules/${ tools . appName }  ) 
1167+                     __dirname 
1168+                         . toLowerCase ( ) 
1169+                         . replace ( / \\ / g,  '/' ) 
1170+                         . includes ( `node_modules/${ tools . appName . toLowerCase ( ) }  ) 
11711171                )  { 
11721172                    const  parts  =  config . dataDir . split ( '/' ) ; 
11731173                    // Remove appName-data/ 
0 commit comments