diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-15 20:59:24 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-15 20:59:24 -0500 |
commit | 49eec46aeb12ce8e0d269ef9a04d48b64b0b5628 (patch) | |
tree | 1a838ded7247ea89222f258443102446445b1c4a /pcr/seeks/seeksdaemon | |
parent | 3e6467f21d721bd98fa72ec5b842a673f3d60549 (diff) | |
download | abslibre-49eec46aeb12ce8e0d269ef9a04d48b64b0b5628.tar.gz abslibre-49eec46aeb12ce8e0d269ef9a04d48b64b0b5628.tar.bz2 abslibre-49eec46aeb12ce8e0d269ef9a04d48b64b0b5628.zip |
Adding packages to pcr
Diffstat (limited to 'pcr/seeks/seeksdaemon')
-rw-r--r-- | pcr/seeks/seeksdaemon | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pcr/seeks/seeksdaemon b/pcr/seeks/seeksdaemon new file mode 100644 index 000000000..551197d28 --- /dev/null +++ b/pcr/seeks/seeksdaemon @@ -0,0 +1,41 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/seeks + +PID=`pidof -o %PPID /usr/bin/seeks` + +case "$1" in + start) + stat_busy "Starting seeks daemon" + [ -z "$PID" ] && /usr/bin/seeks $SEEKS_ARGS + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon seeks + stat_done + fi + ;; + + stop) + stat_busy "Stopping seeks daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon seeks + stat_done + fi + ;; + restart) + $0 stop + while [ ! -z "$PID" -a -d "/proc/$PID" ]; do sleep 1; done + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + +esac +exit 0 + |