summaryrefslogtreecommitdiffstats
path: root/target/device/valka/target_skeleton/etc/rc.d/crond
diff options
context:
space:
mode:
Diffstat (limited to 'target/device/valka/target_skeleton/etc/rc.d/crond')
-rwxr-xr-xtarget/device/valka/target_skeleton/etc/rc.d/crond27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/device/valka/target_skeleton/etc/rc.d/crond b/target/device/valka/target_skeleton/etc/rc.d/crond
new file mode 100755
index 000000000..ef1b7fee0
--- /dev/null
+++ b/target/device/valka/target_skeleton/etc/rc.d/crond
@@ -0,0 +1,27 @@
+#!/bin/ash
+. /etc/rc.subr
+
+start() {
+ echo -n " * Starting crond: "
+ if [ ! -x ${crond_program} ]; then
+ log_error "Missing 'crond' program (${crond_program})"
+ echo "Failed"
+ return 1
+ fi
+
+ ${crond_program} -f -c ${crond_dir} ${crond_flags} &
+ pid=$!
+ if [ "$?" -eq 0 ]; then
+ echo "${pid}" > ${crond_pidfile}
+ echo "Ok"
+ else
+ echo "Failed"
+ fi
+}
+
+stop() {
+ echo " * Stopping crond..."
+ killpid ${crond_pidfile}
+}
+
+rc_run_command "$1" "crond"