diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-21 13:12:20 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-21 13:12:20 -0300 |
commit | 2b8e2cf7956063f583b5ad2425930115761bb7ae (patch) | |
tree | a50efdc4cf99312b80c95718e8693b7e41b034c3 /social/aiccu/aiccu.rc.d | |
parent | 19d0c098d66c67860d212786491f5285014a9e09 (diff) | |
parent | 7bcc3e9d12b9294024067ecaf8ab28a9fe83ab6c (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/midori/PKGBUILD
extra/libffado/PKGBUILD
gnome-unstable/eog/PKGBUILD
gnome-unstable/gnome-settings-daemon/PKGBUILD
testing/util-linux/PKGBUILD
Diffstat (limited to 'social/aiccu/aiccu.rc.d')
-rw-r--r-- | social/aiccu/aiccu.rc.d | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/social/aiccu/aiccu.rc.d b/social/aiccu/aiccu.rc.d new file mode 100644 index 000000000..b0ca08fce --- /dev/null +++ b/social/aiccu/aiccu.rc.d @@ -0,0 +1,60 @@ +#!/bin/bash + +daemon_name=aiccu + +. /etc/rc.conf +. /etc/rc.d/functions + +get_pid() { + pidof $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name daemon" + + PID=`get_pid` + if [ -z "$PID" ]; then + [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid + # RUN + $daemon_name start > /dev/null + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo `get_pid` > /var/run/$daemon_name.pid + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=`get_pid` + # RUN + $daemon_name stop + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f /var/run/$daemon_name.pid &> /dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |