summarylogtreecommitdiffstats
path: root/epos
diff options
context:
space:
mode:
authorjose17112017-01-15 19:04:45 +0100
committerjose17112017-01-15 19:04:45 +0100
commit8d60b027b4c53b709a4f4aeb3569c3411903515f (patch)
treed7c1f7f0f895b8325dee635e5c2b214cde1608de /epos
downloadaur-epos.tar.gz
Initial commit to aur4 (migrated from https://github.com/aur-archive/epos)
Diffstat (limited to 'epos')
-rw-r--r--epos37
1 files changed, 37 insertions, 0 deletions
diff --git a/epos b/epos
new file mode 100644
index 000000000000..151c043359af
--- /dev/null
+++ b/epos
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/eposd`
+case "$1" in
+ start)
+ stat_busy "Starting Epos"
+ if [ -z "$PID" ]; then
+ /usr/bin/eposd
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon epos
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Epos"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon epos
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac