Signed-off-by: Uwe Hermann <uh@uleenucks.de>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. /app/includes.sh
|
. /app/includes.sh
|
||||||
|
|
||||||
# restore
|
# restore
|
||||||
@@ -14,7 +15,8 @@ if [[ "$1" == "restore" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
function configure_cron() {
|
function configure_cron() {
|
||||||
local FIND_CRON_COUNT="$(grep -c 'backup.sh' "${CRON_CONFIG_FILE}" 2> /dev/null)"
|
local FIND_CRON_COUNT
|
||||||
|
FIND_CRON_COUNT="$(grep -c 'backup.sh' "${CRON_CONFIG_FILE}" 2> /dev/null)"
|
||||||
if [[ "${FIND_CRON_COUNT}" -eq 0 ]]; then
|
if [[ "${FIND_CRON_COUNT}" -eq 0 ]]; then
|
||||||
echo "${CRON} bash /app/backup.sh" >> "${CRON_CONFIG_FILE}"
|
echo "${CRON} bash /app/backup.sh" >> "${CRON_CONFIG_FILE}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user