diff options
author | André Fabian Silva Delgado <andre@localhost.localdomain> | 2012-09-21 23:35:58 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <andre@localhost.localdomain> | 2012-09-21 23:35:58 -0300 |
commit | ad96a8790b1cf1be80d5b021562a328053fba03c (patch) | |
tree | 06f21ec6276dff56ca3e2ce9c42ad3f9d950fffd /social/netatalk/netatalk.rc | |
parent | 063cb2e97d16fa097c0ab71c3592e0aff0c75230 (diff) | |
parent | 5a3cd0a0fd7e2af356d44aa25f144fe9616b8239 (diff) | |
download | abslibre-ad96a8790b1cf1be80d5b021562a328053fba03c.tar.gz abslibre-ad96a8790b1cf1be80d5b021562a328053fba03c.tar.bz2 abslibre-ad96a8790b1cf1be80d5b021562a328053fba03c.zip |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'social/netatalk/netatalk.rc')
-rw-r--r-- | social/netatalk/netatalk.rc | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/social/netatalk/netatalk.rc b/social/netatalk/netatalk.rc new file mode 100644 index 000000000..f14d67ee3 --- /dev/null +++ b/social/netatalk/netatalk.rc @@ -0,0 +1,44 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +NAME="Appletalk Services Daemon" +ARGS= +DAEMON=netatalk + +[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON + +PID=`get_pid $DAEMON` + +case "$1" in + start) + stat_busy "Starting $NAME" + [ -z "$PID" ] && $DAEMON $ARGS &>/dev/null + if [ $? = 0 ]; then + add_daemon $DAEMON + stat_done + else + stat_fail + exit 1 + fi + ;; + stop) + stat_busy "Stopping $NAME" + [ -n "$PID" ] && kill $PID &>/dev/null + if [ $? = 0 ]; then + rm_daemon $DAEMON + stat_done + else + stat_fail + exit 1 + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac |