A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
22 lines
653 B
Bash
Executable File
22 lines
653 B
Bash
Executable File
#!/bin/bash
|
|
|
|
checkBackupCrontabApp()
|
|
{
|
|
local name="$1"
|
|
local config_variable="CFG_${name^^}_BACKUP"
|
|
local desired="${!config_variable}"
|
|
local has_cron=0
|
|
if sudo -u $sudo_user_name crontab -l 2>/dev/null | grep -q "$name"; then
|
|
has_cron=1
|
|
fi
|
|
|
|
if [[ "$desired" == "true" && $has_cron -eq 0 ]]; then
|
|
installSetupCrontab "$name"
|
|
databaseCronJobsInsert "$name"
|
|
isSuccessful "Backup crontab enabled for $name."
|
|
elif [[ "$desired" == "false" && $has_cron -eq 1 ]]; then
|
|
removeBackupCrontabApp "$name"
|
|
isSuccessful "Backup crontab removed for $name (disabled in config)."
|
|
fi
|
|
}
|