From 327569c5fca35f440c8b075c31b856ba3ff847e4 Mon Sep 17 00:00:00 2001 From: Robin Kluth Date: Sun, 8 Oct 2023 19:02:45 +0200 Subject: [PATCH] Return actual returned exit code --- src/include/ABHelper.php | 2 +- src/include/ABSettings.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/include/ABHelper.php b/src/include/ABHelper.php index 58fdd21..d4f4b73 100644 --- a/src/include/ABHelper.php +++ b/src/include/ABHelper.php @@ -80,7 +80,7 @@ public static function handlePrePostScript($script, ...$args) { self::backupLog("Script executed!"); if ($resultcode != 0) { - self::backupLog("Script did not returned 0!", self::LOGLEVEL_WARN); + self::backupLog("Script did not returned 0 (it returned $resultcode)!", self::LOGLEVEL_WARN); } } else { self::backupLog($script . ' is not existing! Skipping!', self::LOGLEVEL_ERR); diff --git a/src/include/ABSettings.php b/src/include/ABSettings.php index e974aef..253bc8e 100644 --- a/src/include/ABSettings.php +++ b/src/include/ABSettings.php @@ -209,6 +209,9 @@ public function getContainerSpecificSettings($name, $setEmptyToDefault = true) { return $settings; } + /** + * @return array + */ public function checkCron() { $cronSettings = '# Appdata.Backup cron settings' . PHP_EOL; switch ($this->backupFrequency) {