summaryrefslogtreecommitdiff
path: root/testing/cronie/rc.d
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-17 14:31:18 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-17 14:31:18 -0300
commit545a4c749d49c3fddbc57c157d650b194e2193d8 (patch)
tree7b06384a2d1d1ec07e26eda99bb0016a0540cbfc /testing/cronie/rc.d
parent40df5bbde7fc547479b2cede1f3ffb8e268816b3 (diff)
parent1fcb176285908c33aca3b0f5cb703ec098e5440c (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: multilib/wine/PKGBUILD multilib/zsnes/PKGBUILD testing/frozen-bubble/PKGBUILD testing/perl-sdl/PKGBUILD
Diffstat (limited to 'testing/cronie/rc.d')
-rwxr-xr-xtesting/cronie/rc.d38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/cronie/rc.d b/testing/cronie/rc.d
new file mode 100755
index 000000000..d0659685c
--- /dev/null
+++ b/testing/cronie/rc.d
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+name=crond
+. /etc/conf.d/crond
+PID=$(pidof -o %PPID /usr/sbin/crond)
+
+case "$1" in
+start)
+ stat_busy "Starting $name daemon"
+ [[ -z "$PID" ]] && /usr/sbin/crond $CRONDARGS &>/dev/null \
+ && { add_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+stop)
+ stat_busy "Stopping $name daemon"
+ [[ -n "$PID" ]] && kill $PID &>/dev/null \
+ && { rm_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+reload)
+ stat_busy "Reloading $name daemon"
+ [[ -n "$PID" ]] && kill -HUP $PID &>/dev/null \
+ && { stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+*)
+ echo "usage: $0 {start|stop|restart|reload}"
+ ;;
+esac
+exit 0