File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ #
4+ # Copyright (C) 2011 Greek Research and Technology Network
5+ #
6+
7+ set -e
8+
9+ . common.sh
10+
11+ debug set -x
12+
13+ trap cleanup EXIT
14+
15+ n=$RANDOM
16+ min=$(( n %= 30 ))
17+
18+ echo " SHELL=/bin/sh" > ${TARGET} /etc/crontab
19+ echo " PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" >> ${TARGET} /etc/crontab
20+ printf " \n" >> ${TARGET} /etc/crontab
21+ echo " # m h dom mon dow user command" >> ${TARGET} /etc/crontab
22+ echo " $min * * * * root cd / && run-parts --report cron.hourly" >> ${TARGET} /etc/crontab
23+ echo " $(( min + 7 )) 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report cron.daily )" >> ${TARGET} /etc/crontab
24+ echo " $(( min + 13 )) 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report cron.weekly )" >> ${TARGET} /etc/crontab
25+ echo " $(( min + 24 )) 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report cron.monthly )" >> ${TARGET} /etc/crontab
26+
27+ trap - EXIT
28+ exit 0
You can’t perform that action at this time.
0 commit comments