From 6d6b9fe758354661b333d7511883a69c90945132 Mon Sep 17 00:00:00 2001 From: Robin Kluth Date: Mon, 24 Apr 2023 18:53:13 +0200 Subject: [PATCH] Cron fix #2 --- src/include/ABSettings.php | 1 - src/scripts/checkCron.php | 18 +----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/include/ABSettings.php b/src/include/ABSettings.php index 133a274..9fb55e0 100644 --- a/src/include/ABSettings.php +++ b/src/include/ABSettings.php @@ -190,7 +190,6 @@ public function checkCron() { ABSettings::$appName .= '.beta'; ABSettings::$pluginDir .= '.beta'; ABSettings::$tempFolder .= '.beta'; - ABSettings::$cronFile .= '_beta'; ABSettings::$supportUrl = 'https://forums.unraid.net/topic/136995-pluginbeta-appdatabackup/'; } ABSettings::$externalCmdPidCapture = '& echo $! > ' . escapeshellarg(ABSettings::$tempFolder . '/' . ABSettings::$stateExtCmd) . ' && wait $!'; \ No newline at end of file diff --git a/src/scripts/checkCron.php b/src/scripts/checkCron.php index 6839e5a..6f08d12 100644 --- a/src/scripts/checkCron.php +++ b/src/scripts/checkCron.php @@ -4,23 +4,7 @@ require_once(dirname(__DIR__) . '/include/ABSettings.php'); -echo "Checking cron." . PHP_EOL; - -/** - * Old cron style remnants - ged rid of it - */ -if (file_exists('/etc/cron.d/appdata_backup')) { - @unlink('/etc/cron.d/appdata_backup'); -} -if (file_exists('/etc/cron.d/appdata_backup_beta')) { - @unlink('/etc/cron.d/appdata_backup_beta'); -} - -if (($argv[1] ?? null) == '--remove') { - @unlink(ABSettings::$pluginDir . '/' . ABSettings::$cronFile); - echo "cronfile deleted!" . PHP_EOL; - exit; -} +echo "Manually checking cron." . PHP_EOL; $abSettings = new ABSettings(); $abSettings->checkCron();