mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
Check if cron entry for garbage collection already exists
This commit is contained in:
parent
45a585d945
commit
ff1c91c6d1
|
@ -34,7 +34,11 @@ function stop_socat {
|
|||
function gc_cron {
|
||||
if [[ ! -z $GC_CRON ]]; then
|
||||
echo "Scheduling garbage collection..."
|
||||
(crontab -l ; echo "$GC_CRON /scripts/gc.sh >> /opt/seafile/logs/gc.log 2>&1") | crontab
|
||||
|
||||
if ! crontab -l | grep -Fxq "$GC_CRON /scripts/gc.sh >> /opt/seafile/logs/gc.log 2>&1"; then
|
||||
(crontab -l ; echo "$GC_CRON /scripts/gc.sh >> /opt/seafile/logs/gc.log 2>&1") | crontab
|
||||
fi
|
||||
|
||||
service cron start
|
||||
fi
|
||||
}
|
||||
|
@ -58,4 +62,4 @@ function sig_kill_all () {
|
|||
pkill -SIGKILL -f "wsgidav.server.server_cli"
|
||||
pkill -SIGKILL -f "notification-server -c ${central_config_dir}"
|
||||
pkill -SIGKILL -f "seafile-monitor.sh"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue