22 lines
565 B
Plaintext
22 lines
565 B
Plaintext
|
|
#!/bin/sh /etc/rc.common
|
||
|
|
START=30
|
||
|
|
|
||
|
|
start()
|
||
|
|
{
|
||
|
|
/usr/bin/set_kernel_timezone
|
||
|
|
|
||
|
|
touch /etc/crontabs/root
|
||
|
|
if ! grep -q "set_kernel_timezone" /etc/crontabs/root; then
|
||
|
|
echo '0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1' >> /etc/crontabs/root
|
||
|
|
/etc/init.d/cron enable
|
||
|
|
#only restart cron if it is currently running
|
||
|
|
#since we initialize this before cron, this will
|
||
|
|
#make sure we don't start cron twice at boot
|
||
|
|
cron_active=$(ps | grep "crond" | grep -v "grep" )
|
||
|
|
if [ -n "$cron_active" ] ; then
|
||
|
|
/etc/init.d/cron restart
|
||
|
|
fi
|
||
|
|
fi
|
||
|
|
}
|
||
|
|
|