File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
root/etc/s6-overlay/s6-rc.d Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ for cron_user in abc root; do
1010 # if crontabs do not exist in config
1111 if [[ ! -f "/config/crontabs/${cron_user}" ]]; then
1212 # copy crontab from system
13- if crontab -l -u "${cron_user}" >/dev/null; then
13+ if crontab -l -u "${cron_user}" >/dev/null 2>&1 ; then
1414 crontab -l -u "${cron_user}" >"/config/crontabs/${cron_user}"
1515 fi
1616
Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22# shellcheck shell=bash
33
4- if builtin command -v crontab >/dev/null && [[ -n "$(crontab -l -u abc)" || -n "$(crontab -l -u root)" ]]; then
5- if builtin command -v busybox >/dev/null && [[ $(busybox) =~ [[:space:]](crond)([,]|$) ]]; then
4+ if builtin command -v crontab >/dev/null 2>&1 && [[ -n "$(crontab -l -u abc)" || -n "$(crontab -l -u root)" ]]; then
5+ if builtin command -v busybox >/dev/null 2>&1 && [[ $(busybox) =~ [[:space:]](crond)([,]|$) ]]; then
66 exec busybox crond -f -S -l 5
77 elif [[ -f /usr/bin/apt ]] && [[ -f /usr/sbin/cron ]]; then
88 exec /usr/sbin/cron -f -L 5
You can’t perform that action at this time.
0 commit comments