summaryrefslogtreecommitdiffstats
path: root/sbin/init.d/crond
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/init.d/crond')
-rwxr-xr-xsbin/init.d/crond21
1 files changed, 21 insertions, 0 deletions
diff --git a/sbin/init.d/crond b/sbin/init.d/crond
new file mode 100755
index 0000000..98724c6
--- /dev/null
+++ b/sbin/init.d/crond
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# warning : crond is buggy, it doesn't close its fd's before forking !
+
+. `dirname $0`/functions
+
+option bin reserved_option /usr/sbin/crond
+option cmdline reserved_option 'daemon $bin'
+
+pidfile=/var/run/cron.pid
+crontab=/etc/crontab
+crontabdir=/var/spool/cron
+
+function fct_pre_start {
+ if [ ! -d $crontabdir] ; then
+ mkdir -p -m 750 $crontabdir || return 1
+ fi
+}
+
+load_config
+