Skip to content

Commit

Permalink
silent cron
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Nemchik <[email protected]>
  • Loading branch information
nemchik committed Nov 11, 2023
1 parent d79e4c0 commit 9a370cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/svc-cron/run
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

if builtin command -v crontab >/dev/null 2>&1 && [[ -n "$(crontab -l -u abc)" || -n "$(crontab -l -u root)" ]]; then
if builtin command -v busybox >/dev/null 2>&1 && [[ $(busybox) =~ [[:space:]](crond)([,]|$) ]]; then
if builtin command -v crontab >/dev/null 2>&1 && [[ -n "$(crontab -l -u abc 2>/dev/null || true)" || -n "$(crontab -l -u root 2>/dev/null || true)" ]]; then
if builtin command -v busybox >/dev/null 2>&1 && [[ $(busybox || true) =~ [[:space:]](crond)([,]|$) ]]; then
exec busybox crond -f -S -l 5
elif [[ -f /usr/bin/apt ]] && [[ -f /usr/sbin/cron ]]; then
exec /usr/sbin/cron -f -L 5
Expand Down

0 comments on commit 9a370cb

Please sign in to comment.