4 # Required-Start: $remote_fs $syslog
5 # Required-Stop: $remote_fs $syslog
6 # Default-Start: 2 3 4 5
8 # Short-Description: Start and stop BitlBee IRC to other chat networks gateway
12 # Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl
15 PATH
=/usr
/local
/sbin
:/usr
/local
/bin
:/sbin
:/bin
:/usr
/sbin
:/usr
/bin
16 DESC
="BitlBee IRC/IM gateway"
18 DAEMON
=/usr
/sbin
/$NAME
19 PIDFILE
=/var
/run
/$NAME.pid
20 SCRIPTNAME
=/etc
/init.d
/$NAME
22 # Gracefully exit if the package has been removed.
23 [ -x $DAEMON ] ||
exit 0
29 # Read config file if it is present.
30 if [ -r /etc
/default
/$NAME ]; then
36 # Function that starts the daemon/service.
39 # Make sure BitlBee can actually write its PID...
41 chown bitlbee
: $PIDFILE
43 start-stop-daemon
--start --quiet --pidfile $PIDFILE \
44 --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS
48 # Function that stops the daemon/service.
51 start-stop-daemon
--stop --quiet --pidfile $PIDFILE \
58 [ "$BITLBEE_DISABLED" = "1" ] && exit 0
60 echo -n "Starting $DESC: $NAME"
65 echo -n "Stopping $DESC: $NAME"
71 # No reload target, but there's a REHASH command which we
76 echo -n "Restarting $DESC: $NAME"
83 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2