2006-10-04 22:05:48 +02:00
|
|
|
#!/bin/sh /etc/rc.common
|
2006-06-27 02:36:13 +02:00
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
2007-05-10 12:38:53 +02:00
|
|
|
START=50
|
2006-06-27 02:36:13 +02:00
|
|
|
|
2006-10-04 22:05:48 +02:00
|
|
|
start () {
|
2009-04-29 15:00:42 +02:00
|
|
|
loglevel=$(/sbin/uci get "system.@system[0].cronloglevel" 2>/dev/null)
|
2009-02-17 18:29:17 +01:00
|
|
|
[ -z "$(ls /etc/crontabs/)" ] && exit 1
|
2006-10-04 22:05:48 +02:00
|
|
|
mkdir -p /var/spool/cron
|
2006-11-04 13:47:45 +01:00
|
|
|
[ -L /var/spool/cron/crontabs ] || ln -s /etc/crontabs /var/spool/cron/crontabs
|
2009-04-29 15:00:42 +02:00
|
|
|
crond -c /etc/crontabs -l ${loglevel:-5}
|
2006-10-04 22:05:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2007-06-22 10:47:29 +02:00
|
|
|
killall -9 crond
|
2006-10-04 22:05:48 +02:00
|
|
|
}
|