File: configure.initd.debian

package info (click to toggle)
ajaxterm 0.10-12
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 844 kB
  • ctags: 1,787
  • sloc: python: 10,425; sh: 96; makefile: 51
file content (33 lines) | stat: -rw-r--r-- 631 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
DAEMON=%(bin)s/ajaxterm
PORT=%(port)s
PIDFILE=/var/run/ajaxterm.pid

[ -x "$DAEMON" ] || exit 0

#. /lib/lsb/init-functions

case "$1" in
	start)
		echo "Starting ajaxterm on port $PORT"
		start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- --daemon --port=$PORT --uid=nobody || return 2
	;;
	stop)
		echo "Stopping ajaxterm"
		start-stop-daemon  --stop --pidfile $PIDFILE
		rm -f $PIDFILE
	;;
	restart|force-reload)
		$0 stop
		sleep 1
		$0 start
	;;
	*)
		echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
		exit 3
	;;
esac

: