This file is indexed.

/etc/init.d/gbrowse-slave is in gbrowse 2.54+dfsg-2build1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh
### BEGIN INIT INFO
# Provides:          gbrowse-slave
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/Stop the gbrowse_slave rendering server.
# Description: Enable the GBrowse slave rendering mode
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=debian/gbrowse/bin/gbrowse_slave
NAME="gbrowse-slave"
DESC="GBrowse slave track rendering server"

#test -x $DAEMON || exit 0
set -e

USER=
PRELOAD=""
RUNDIR=/var/run/gbrowse
LOGDIR=/var/log/gbrowse
PORT='8101 8102 8103'
VERBOSITY=1
NICE=0

if [ -f /etc/default/gbrowse-slave ]; then
  . /etc/default/gbrowse-slave
fi

mkdir -p $RUNDIR
chown -R $USER $RUNDIR
mkdir -p $LOGDIR
chown -R $USER $LOGDIR

case "$1" in
  start)
	echo -n "Starting $DESC: $NAME "
	for port in $PORT; do
	    if [ -e $RUNDIR/$NAME.$port.pid ] && kill -0 `cat $RUNDIR/$NAME.$port.pid` >/dev/null 2>&1 ; then
		echo "$NAME already running, use restart instead."
	    else
                PRELOAD_DB=""
		if [ "$PRELOAD" != "" ]; then
                    PRELOAD_DB="--preload $PRELOAD"
	        fi
		if [ "$PREFORK" = "" ]; then
                    PREFORK="1"
                fi
		PID="$RUNDIR/$NAME.$port.pid"
		ARGS="--port $port --verbose $VERBOSITY --log $LOGDIR/gbrowse_slave --prefork $PREFORK --pid $PID $PRELOAD_DB"
		/bin/sh -c "nice -n $NICE $DAEMON $ARGS"
		chown $USER $PID
		echo -n "$port "
	    fi
	done
	echo "."
	;;
  stop)
	echo -n "Stopping $DESC: $NAME "
	killed=0
	for port in $PORT; do
	    if test -e $RUNDIR/$NAME.$port.pid ; then
		kill -TERM `cat $RUNDIR/$NAME.$port.pid` >/dev/null 2>&1
		killed=1
	    fi
            echo -n "$port "
        done
	if [ "$killed" -ne 1 ]; then
	    ps -ef| grep $DAEMON | grep -v grep | awk '{ print $2 }' | xargs kill -TERM >/dev/null 2>&1 || true
        fi
	echo "."
	;;
  status)
       for port in $PORT; do
               if test -e $RUNDIR/$NAME.$port.pid ; then
                       kill -0 `cat $RUNDIR/$NAME.$port.pid`
                       if [ "$?" -eq 0 ]; then
                               echo "$NAME is running on port $port."
                       fi
               else
                       echo "$NAME is not running on port $port."
               fi
       done
       ;;
  restart|force-reload)
	$0 stop
	sleep 3
	$0 start
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
	exit 1
	;;
esac

exit 0