From 6ca0a396866d5c975b84dd2cb7e35ccb417ead38 Mon Sep 17 00:00:00 2001 From: ljm42 Date: Tue, 24 Oct 2023 17:56:01 -0700 Subject: [PATCH] remove legacy unraid.net settings migration --- .../dynamix.my.servers/scripts/cfgMigration | 91 ------------------- sbin/upgrade | 7 -- 2 files changed, 98 deletions(-) delete mode 100755 emhttp/plugins/dynamix.my.servers/scripts/cfgMigration diff --git a/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration b/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration deleted file mode 100755 index 92f1a8e3f..000000000 --- a/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/php - $var['csrf_token'], - '#file' => $mys_cfg, - '#section' => 'remote' - ]; - foreach($orig['remote'] as $key => $value) { - $fields_mys_remote[$key] = $value; - } - update($url, http_build_query($fields_mys_remote)); - } - /* - // write [wizard] section to myservers.cfg - if(!empty($orig['wizard'])) { - $fields_mys_wizard = [ - 'csrf_token' => $var['csrf_token'], - '#file' => $mys_cfg, - '#section' => 'wizard' - ]; - foreach($orig['wizard'] as $key => $value) { - $fields_mys_wizard[$key] = $value; - } - update($url, http_build_query($fields_mys_wizard)); - } - */ - // remove [remote] section from dynamix.cfg - if(!empty($orig['remote'])) { - $fields_dyn_remote = [ - 'csrf_token' => $var['csrf_token'], - '#file' => $dyn_cfg, - '#section' => 'remote', - '#cleanup' => 'true' - ]; - foreach($orig['remote'] as $key => $value) { - $fields_dyn_remote[$key] = ''; - } - update($url, http_build_query($fields_dyn_remote)); - } - // remove [wizard] section from dynamix.cfg - if(!empty($orig['wizard'])) { - $fields_dyn_wizard = [ - 'csrf_token' => $var['csrf_token'], - '#file' => $dyn_cfg, - '#section' => 'wizard', - '#cleanup' => 'true' - ]; - foreach($orig['wizard'] as $key => $value) { - $fields_dyn_wizard[$key] = ''; - } - update($url, http_build_query($fields_dyn_wizard)); - } - // remove [remote] and [wizard] section headings from dyn_cfg file - $oldtext = file_get_contents($dyn_cfg); - $newtext = preg_replace ('/\[(remote|wizard)\]\n/', '', $oldtext); - if (strcmp($oldtext, $newtext) !== 0) { - file_put_contents($dyn_cfg, $newtext); - } -} -if (!file_exists($mys_cfg)) touch($mys_cfg); - -?> diff --git a/sbin/upgrade b/sbin/upgrade index b22c109e7..d84d52a49 100755 --- a/sbin/upgrade +++ b/sbin/upgrade @@ -28,13 +28,6 @@ fi # remove previous auto-populated docker template descriptions /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/fixDescriptions -# migrate settings from early unraid.net users -CFG_OLD=/boot/config/plugins/Unraid.net -CFG_NEW=/boot/config/plugins/dynamix.my.servers -[[ -d "$CFG_OLD" ]] && [[ ! -d "$CFG_NEW" ]] && mv "$CFG_OLD" "$CFG_NEW" -mkdir -p "$CFG_NEW" -/usr/local/emhttp/plugins/dynamix.my.servers/scripts/cfgMigration - # stating with 6.10 'USE_SSL="auto"' without a LE cert is invalid [[ ! -f /boot/config/ssl/certs/certificate_bundle.pem ]] && sed -i s/USE_SSL=\"auto\"/USE_SSL=\"no\"/ /boot/config/ident.cfg