diff options
author | Andreas Oberritter <obi@opendreambox.org> | 2015-03-27 23:21:00 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-04-13 12:55:49 +0200 |
commit | d1f5abc3e6b0b0737dc7d7fadc95e6600f122d36 (patch) | |
tree | 5ec9ac265165e8d1ef9640cca3124fbcbde0f1cc /meta-python/recipes-connectivity/gateone/gateone/gateone-init | |
parent | 9e754c3e23247609e24d6bf268dba05b6266c167 (diff) | |
download | meta-openembedded-contrib-d1f5abc3e6b0b0737dc7d7fadc95e6600f122d36.tar.gz |
gateone: move to meta-python
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python/recipes-connectivity/gateone/gateone/gateone-init')
-rw-r--r-- | meta-python/recipes-connectivity/gateone/gateone/gateone-init | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-python/recipes-connectivity/gateone/gateone/gateone-init b/meta-python/recipes-connectivity/gateone/gateone/gateone-init new file mode 100644 index 0000000000..a1cf5ce7e9 --- /dev/null +++ b/meta-python/recipes-connectivity/gateone/gateone/gateone-init @@ -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=/var/lib/gateone/gateone.py +PIDFILE=/var/run/gateone.pid +WORKDIR=/var/lib/gateone + +do_start() { + cd $WORKDIR + /usr/bin/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 |