This file is indexed.

/etc/init.d/atheme-services is in atheme-services 7.2.9-1build1.

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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#! /bin/sh

### BEGIN INIT INFO
# Provides:          atheme-services
# Required-Start:    $syslog $remote_fs
# Required-Stop:     $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Atheme-services daemon init.d script
# Description:       Use to manage the Atheme services daemon.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/atheme-services
NAME="atheme-services"
DESC="Atheme IRC Services"

. /lib/lsb/init-functions

test -x $DAEMON || exit 0
RUNDIR="/var/run/atheme"
# Include atheme defaults if available
if [ -f /etc/default/atheme-services ] ; then
	. /etc/default/atheme-services
fi


if [ "$ENABLED" != "1" ] ; then
	echo "Please set ENABLED to 1 in /etc/default/atheme-services"
	exit 0
fi

set -e

case "$1" in
  start)
	echo -n "Starting $DESC: $NAME "
	if [ ! -d "$RUNDIR" ]; then
		echo -n "run folder missing "
		rm -rf "$RUNDIR"
		echo -n "cleared "
		mkdir -p "$RUNDIR"
		chown irc:irc $RUNDIR/
		chmod 755 $RUNDIR/
		echo -n "created "
	fi
	if [ -f "$RUNDIR/atheme.pid" ] && ps `cat $RUNDIR/atheme.pid ` > /dev/null ; then
		echo "Already running!"
	else
		ps `cat $RUNDIR/atheme.pid ` > /dev/null || rm -f $RUNDIR/atheme.pid
		start-stop-daemon -u irc -c irc --start --quiet --pidfile $RUNDIR/atheme.pid \
			--exec $DAEMON -- $DAEMON_OPTS
	fi
	echo "."
	;;
  stop)
	echo -n "Stopping $DESC: $NAME "
	if [ -f "$RUNDIR/atheme.pid" ]; then
		start-stop-daemon --stop --quiet --pidfile $RUNDIR/atheme.pid \
			--exec $DAEMON --signal 15
	else
		echo "not running."
	fi
	echo "."
	;;
  reload|force-reload)
    	echo -n "Reloading $DESC configuration files: $NAME "
	if [ ! -d "$RUNDIR" ]; then
		echo "run folder missing!"
	else
		if [ -f "$RUNDIR/atheme.pid" ]; then
			start-stop-daemon --stop --signal 1 --quiet --pidfile \
				$RUNDIR/atheme.pid --exec $DAEMON
		else
			echo "not running!"
		fi
		echo "."
	fi
	;;
  restart)
    	echo -n "Restarting $DESC: $NAME "
	if [ ! -d "$RUNDIR" ]; then
		echo -n "run folder missing "
		rm -rf "$RUNDIR"
		echo -n "cleared "
		mkdir -p "$RUNDIR"
		chown irc:irc $RUNDIR/
		chmod 755 $RUNDIR/
		echo -n "created "
	fi
	if [ -f "$RUNDIR/atheme.pid" ]; then
		start-stop-daemon --stop --quiet --pidfile \
			$RUNDIR/atheme.pid --exec $DAEMON --signal 15
		echo -n "."
		sleep 1
	fi
	echo -n "."
	start-stop-daemon -u irc -c irc --start --quiet --pidfile \
		$RUNDIR/atheme.pid --exec $DAEMON -- $DAEMON_OPTS
	echo "."
	;;
  status)
	status_of_proc -p $RUNDIR/atheme.pid $DAEMON $NAME
	;;
  *)
	N=/etc/init.d/$NAME
	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
	# echo "Usage: $N {start|stop|restart|force-reload}" >&2
	echo "Usage: $N {start|stop|restart|reload|status}" >&2
	exit 1
	;;
esac

exit 0