summarylogtreecommitdiffstats
path: root/fingbox-sentinel.script
diff options
context:
space:
mode:
authorAlain Spaite (Domspaite)2015-06-08 11:37:31 +0200
committerAlain Spaite (Domspaite)2015-06-08 11:37:31 +0200
commit7c1de021b481ac43c2b0e9ef4567c5c529a4d382 (patch)
treef91d2485176665a205efc8bc3a2b0f2be58a890a /fingbox-sentinel.script
downloadaur-7c1de021b481ac43c2b0e9ef4567c5c529a4d382.tar.gz
Initial Import
Diffstat (limited to 'fingbox-sentinel.script')
-rwxr-xr-xfingbox-sentinel.script45
1 files changed, 45 insertions, 0 deletions
diff --git a/fingbox-sentinel.script b/fingbox-sentinel.script
new file mode 100755
index 000000000000..a2befed7a9ef
--- /dev/null
+++ b/fingbox-sentinel.script
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+#
+# Copyright 2012 by Overlook
+# description: Fingbox Sentinel
+#
+
+# Start the service
+start() {
+ echo -n "Starting fingbox-sentinel: "
+ export LD_LIBRARY_PATH="/usr/lib/fing"
+ export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
+ ulimit -n 1024
+ ulimit -c 0
+ nohup /usr/lib/fing/fing.bin --sentinel >/dev/null 2>/dev/null &
+ echo $! > /run/fingbox-sentinel.pid
+ ### Create the lock file ###
+ touch /run/lock/subsys/fingbox-sentinel
+ #success $"fingbox-sentinel startup"
+ #echo
+}
+# Stop the service
+stop() {
+ echo -n "Stopping fingbox-sentinel: "
+ killall fingbox-sentinel
+ ### Now, delete the lock file ###
+ rm -f /run/lock/subsys/fingbox-sentinel
+}
+### main logic ###
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ stop
+ start
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|reload}"
+ exit 1
+esac
+exit 0
+