This file is indexed.

/etc/init.d/sks is in sks 1.1.1+dpkgv3-7.

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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/sh -e
#
### BEGIN INIT INFO
# Provides:          sks
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO
#
# Start/stops the sks daemons.
#
#

# Reads config file
[ -r /etc/default/sks ] && . /etc/default/sks

DAEMON=/usr/sbin/sks
SKSDBPID=/var/run/sks/sksdb.pid
SKSRECONPID=/var/run/sks/sksrecon.pid

# See if the daemon is there

test -e $DAEMON || exit 0

if [ ! -x $DAEMON ]; then
    echo "ERROR: $DAEMON is not executable"
    exit 1
fi


wait_for_deaddaemon () {
	pidfile=$1
	pid=`cat $pidfile 2>/dev/null` || true
	sleep 1
	if test -n "$pid"
	then
		if kill -0 $pid 2>/dev/null
		then
			echo -n "."
			cnt=0
			while kill -0 $pid 2>/dev/null
			do
				cnt=`expr $cnt + 1`
				if [ $cnt -gt 30 ]
				then
					echo " FAILED."
					return 1
				fi
				sleep 2
				echo -n "."
			done
			rm -f $pidfile
		else
			rm -f $pidfile
		fi
	fi
	return 0
}


case "$1" in
    start)
	echo -n "Starting sks daemons:"

	if [ "$initstart" != "yes" ]; then
	    echo " Not starting sks (as configured in /etc/default/sks)"
	    exit 0
	fi

	mkdir -p `dirname "$SKSDBPID"`
	chown debian-sks `dirname "$SKSDBPID"`

	echo -n " sksdb.."

	start-stop-daemon --start --quiet --oknodo \
			  --chuid debian-sks:debian-sks \
			  --background \
			  --make-pidfile \
			  --pidfile $SKSDBPID \
			  --exec $DAEMON -- db

	echo -n " sksrecon.."

	start-stop-daemon --start --quiet --oknodo \
			  --chuid debian-sks:debian-sks \
			  --background \
			  --make-pidfile \
			  --pidfile $SKSRECONPID \
			  --exec $DAEMON -- recon

	echo " done."

    ;;
    stop)
	echo -n "Stopping sks daemons:"

	echo -n " sksrecon.."
	start-stop-daemon --stop --quiet --oknodo --pidfile $SKSRECONPID
	wait_for_deaddaemon $SKSRECONPID || exit 1

	echo -n " sksdb.."
	start-stop-daemon --stop --quiet --oknodo --pidfile $SKSDBPID
	wait_for_deaddaemon $SKSDBPID || exit 1

	echo " done."

    ;;
    reload)
	# Hupping at least reopens logfiles.
	# membership and mailsync are regularily read anyway
	# not sure about the rest
	#    -- weasel
	echo -n "Reloading sks daemons:"
	echo -n " sksrecon.."
	start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile $SKSRECONPID

	echo -n " sksdb.."
	start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile $SKSDBPID

	echo " done."
    ;;
    restart|force-reload)
	$0 stop
	sleep 1
	$0 start
    ;;
    *)
	echo "Usage: $0 {start|stop|reload|restart|force-reload}"
	exit 1
    ;;
esac

exit 0