summaryrefslogtreecommitdiff
path: root/social/seeks/seeksdaemon
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-04-11 15:47:48 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-04-11 15:47:48 -0300
commit0a5c3c1b892045d2867e5deaed544f1a2e9f2a5e (patch)
treef4d9b5074ad4f7f0b34f6e14f97bd05c219b5fc9 /social/seeks/seeksdaemon
parent0281f473276b0a6278686a8ecaaf10b39f1d3828 (diff)
downloadabslibre-0a5c3c1b892045d2867e5deaed544f1a2e9f2a5e.tar.gz
abslibre-0a5c3c1b892045d2867e5deaed544f1a2e9f2a5e.tar.bz2
abslibre-0a5c3c1b892045d2867e5deaed544f1a2e9f2a5e.zip
social/seeks-0.4.1-2
Merged seeks-git into it
Diffstat (limited to 'social/seeks/seeksdaemon')
-rw-r--r--social/seeks/seeksdaemon41
1 files changed, 41 insertions, 0 deletions
diff --git a/social/seeks/seeksdaemon b/social/seeks/seeksdaemon
new file mode 100644
index 000000000..551197d28
--- /dev/null
+++ b/social/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
+