This file is indexed.

/etc/init.d/ircd-ratbox is in ircd-ratbox 3.0.7.dfsg-3.

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
115
116
117
118
119
#! /bin/sh

# ircd-ratbox	Start/stop the ratbox IRC server.

# This file is based on debian's ircd-hybrid init script
# Version:	ircd-hybrid  7.0rc9-1  03-Mar-2003  joshk@triplehelix.org
# Version:	ircd-hybrid  7.2.2-2   10-Sep-2006  ag@roxor.cx
# Version:	ircd-ratbox  2.2.6-1   21-Aug-2007  acornet@debian.org

### BEGIN INIT INFO
# Provides:          ircd-ratbox
# Required-Start:    $remote_fs $network
# Required-Stop:     $remote_fs $network
# Should-Start:      $named $time
# Should-Stop:       $named $time
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: ircd-ratbox daemon init.d script
# Description:       Control ircd-ratbox IRC server daemon.
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/ircd-ratbox
DEFAULT=/etc/default/ircd-ratbox
NAME=ircd-ratbox
DESC="ratbox IRC Server"
ENABLED=0

test -f $DAEMON || exit 0

if [ -e $DEFAULT ]; then
	. $DEFAULT
fi

test "$ENABLED" != "0" || exit 0

[ -f /etc/default/rcS ] && . /etc/default/rcS
. /lib/lsb/init-functions

set -e

ratbox_start()
{
	if [ ! -d /var/run/ircd ] ; then
		mkdir /var/run/ircd
		chown irc:irc /var/run/ircd
	fi
	if [ -f /var/run/ircd/$NAME.pid ] ; then
		echo -n " already running"
		return 0
	fi
	start-stop-daemon --start --quiet \
		-u irc -c irc --pidfile /var/run/ircd/$NAME.pid \
		--exec $DAEMON -- \
		-pidfile /var/run/ircd/$NAME.pid > /dev/null \
		|| return 2
	return 0
}

ratbox_stop()
{
	start-stop-daemon --oknodo --stop --quiet \
		--pidfile /var/run/ircd/$NAME.pid \
		--signal 15 --exec $DAEMON -- -pidfile /var/run/ircd/$NAME.pid \
		|| return 2
	return 0
}

ratbox_reload()
{
	if [ -f "/var/run/ircd/$NAME.pid" ]; then
		kill -s HUP $(cat /var/run/ircd/$NAME.pid)
		return 0
	else
		return 2
	fi
}

case "$1" in
start)
	log_daemon_msg "Starting ircd-ratbox" "ircd-ratbox"
	ratbox_start
	case "$?" in
	0) log_end_msg 0 ;;
	1|2) log_end_msg 1 ;;
	esac
	;;
stop)
	log_daemon_msg "Stopping $NAME" "$NAME"
	ratbox_stop
	case "$?" in
	0|1) log_end_msg 0 ;;
	2) log_end_msg 1 ;;
	esac
	;;
reload)
	log_daemon_msg "Reloading $NAME" "$NAME"
	ratbox_reload
	case "$?" in
	0|1) log_end_msg 0 ;;
	2) log_end_msg 1 ;;
	esac
	;;
restart|force-reload)
	log_daemon_msg "Restarting $NAME" "$NAME"
	ratbox_stop
	ratbox_start
	case "$?" in
	0) log_end_msg 0 ;;
	1|2) log_end_msg 1 ;;
	esac
	;;
*)
	echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
	exit 1
	;;
esac

exit 0