3
# skeleton example file to build /etc/init.d/ scripts.
4
# This file should be used to construct scripts for /etc/init.d.
6
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
8
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
13
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14
DAEMON=/usr/sbin/jabberd-irc
15
CMDLINE=/usr/bin/python/usr/sbin/jabberd-irc
19
PID=/var/run/jabber/$NAME.pid
22
# Create needed dir in /var/run.
23
if [ ! -d /var/run/jabber ] ; then
25
chown jabber:adm /var/run/jabber
26
chmod 0775 /var/run/jabber
29
if [ -f /etc/default/jabber-irc ]; then
30
. /etc/default/jabber-irc
33
. /lib/lsb/init-functions
35
test -x $DAEMON -a "$ENABLED" -eq "1" || exit 0
42
PIDDIR=/proc/$(cat $PID)
43
if [ -d ${PIDDIR} -a "$(cat ${PIDDIR}/cmdline)" = "$CMDLINE" ]; then
44
log_success_msg "$DESC already started; not starting"
47
log_success_msg "Removing stale PID file $PID"
52
log_daemon_msg "Starting $DESC: "
54
start-stop-daemon -b -c jabber:adm --start --quiet --pidfile $PID\
55
--make-pidfile --exec $DAEMON -- $ARGS
59
echo -n "Stopping $DESC: "
60
start-stop-daemon -o --stop --signal INT --quiet --retry 3 \
61
--pidfile $PID --exec /usr/bin/python
67
# If the daemon can reload its config files on the fly
68
# for example by sending it SIGHUP, do it here.
70
# If the daemon responds to changes in its config file
71
# directly anyway, make this a do-nothing entry.
73
# echo "Reloading $DESC configuration files."
74
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
75
# /var/run/jabber/$NAME.pid --exec $DAEMON
79
# If the "reload" option is implemented, move the "force-reload"
80
# option to the "reload" entry above. If not, "force-reload" is
81
# just the same as "restart".
89
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
90
echo "Usage: $N {start|stop|restart|force-reload}" >&2