aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-connectivity/gateone/gateone/gateone-init.in
diff options
context:
space:
mode:
authorDan McGregor <dan.mcgregor@usask.ca>2015-11-04 23:05:55 -0600
committerMartin Jansa <Martin.Jansa@gmail.com>2015-11-06 17:53:58 +0100
commit4a9921c16e88ca38a6a54e49bc79a58d75b67a9c (patch)
tree639bac5a774fcd1911b76c702f097cd79c00b3ac /meta-python/recipes-connectivity/gateone/gateone/gateone-init.in
parent0b895ac766b3e5843a38cc7838368eed53386ab3 (diff)
downloadmeta-openembedded-contrib-4a9921c16e88ca38a6a54e49bc79a58d75b67a9c.tar.gz
gateone: update to latest git
This version works with pyton-tornado 4.2 as currently distributed with OE. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python/recipes-connectivity/gateone/gateone/gateone-init.in')
-rw-r--r--meta-python/recipes-connectivity/gateone/gateone/gateone-init.in47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-python/recipes-connectivity/gateone/gateone/gateone-init.in b/meta-python/recipes-connectivity/gateone/gateone/gateone-init.in
new file mode 100644
index 0000000000..86d655c94d
--- /dev/null
+++ b/meta-python/recipes-connectivity/gateone/gateone/gateone-init.in
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides: gateone
+# Required-Start: networking
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Gateone HTML5 ssh client
+# Description: Gateone HTML5 terminal emulator and SSH client.
+### END INIT INFO
+
+. /etc/init.d/functions
+
+NAME=gateone
+DAEMON=@bindir@/gateone
+PIDFILE=/run/gateone.pid
+WORKDIR=@localstate@/lib/gateone
+
+do_start() {
+ cd $WORKDIR
+ @bindir@/python $DAEMON > /dev/null 2>&1 &
+ cd $OLDPWD
+}
+
+do_stop() {
+ kill -TERM `cat $PIDFILE`
+}
+
+case "$1" in
+ start)
+ echo "Starting gateone"
+ do_start
+ ;;
+ stop)
+ echo "Stopping gateone"
+ do_stop
+ ;;
+ restart|force-reload)
+ echo "Restart gateone"
+ do_stop
+ sleep 1
+ do_start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac