refactor: change flag that skips delete on uninstall (#892)

This commit is contained in:
ljm42
2024-08-13 10:40:18 -07:00
committed by GitHub
parent 9ea2327fa0
commit 2046fa5310

View File

@@ -161,11 +161,8 @@ exit 0
<?
$msini = @parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg', true);
# for convenience, scan myservers.cfg for deleteOnUninstall="no" and if that exists,
# then skip the rest of the cleanup.
$deleteOnUninstall = ($msini === false || empty($msini['plugin']['deleteOnUninstall']) || $msini['plugin']['deleteOnUninstall'] == 'yes');
if (!$deleteOnUninstall) {
# if no_delete_on_uninstall exists on flash drive then skip the rest of the cleanup (useful when switching between staging and production)
if (file_exists("/boot/config/plugins/dynamix.my.servers/no_delete_on_uninstall")) {
exit(0);
}