2006-10-04 20:05:48 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2011-11-07 22:58:39 +00:00
|
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
|
2007-05-10 10:38:53 +00:00
|
|
|
START=50
|
2006-06-27 00:36:13 +00:00
|
|
|
|
2011-11-07 22:58:39 +00:00
|
|
|
SERVICE_USE_PID=1
|
2011-01-28 12:50:10 +00:00
|
|
|
|
2006-10-04 20:05:48 +00:00
|
|
|
start () {
|
2010-05-17 19:34:46 +00:00
|
|
|
loglevel=$(uci_get "system.@system[0].cronloglevel")
|
2009-02-17 17:29:17 +00:00
|
|
|
[ -z "$(ls /etc/crontabs/)" ] && exit 1
|
2006-10-04 20:05:48 +00:00
|
|
|
mkdir -p /var/spool/cron
|
2010-03-21 17:16:41 +00:00
|
|
|
ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
|
2011-11-07 22:58:39 +00:00
|
|
|
service_start /usr/sbin/crond -c /etc/crontabs -l ${loglevel:-5}
|
2006-10-04 20:05:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2011-11-07 22:58:39 +00:00
|
|
|
service_stop /usr/sbin/crond
|
2006-10-04 20:05:48 +00:00
|
|
|
}
|