File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -473,16 +473,22 @@ sort_cron_jobs() {
473473# Sync cronjobs with system cron
474474sync_cron_jobs () {
475475 source $USER_DATA /user.conf
476- rm -f /var/spool/cron/$user
476+
477+ if [ -e " /var/spool/cron/crontabs" ]; then
478+ sys_cron=" /var/spool/cron/crontabs/$user "
479+ else
480+ sys_cron=" /var/spool/cron/$user "
481+ fi
482+ rm -f $sys_cron
477483 if [ " $CRON_REPORTS " = ' yes' ]; then
478- echo " MAILTO=$CONTACT " > /var/spool/cron/ $user
484+ echo " MAILTO=$CONTACT " > $sys_cron
479485 fi
480486 while read line; do
481487 eval $line
482488 if [ " $SUSPENDED " = ' no' ]; then
483489 echo " $MIN $HOUR $DAY $MONTH $WDAY $CMD " | \
484490 sed -e " s/%quote%/'/g" -e " s/%dots%/:/g" \
485- >> /var/spool/cron/ $user
491+ >> $sys_cron
486492 fi
487493 done < $USER_DATA /cron.conf
488494}
You can’t perform that action at this time.
0 commit comments