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