Here is an example jabberd
startup and shutdown script for Red Hat Linux. It is written so
that it may be managed by chkconfig.
Make sure to configure the
environment variable JABBER_DIR
for your environment.
1. Create /etc/init.d/jabberd
#!/bin/sh2. Create startup and shutdown /etc/rc.? links by adding the jabberd script to chkconfig.
# chkconfig: 345 15 85
# description: Startup and shutdown script for Jabber open source server.
JABBER_DIR=/usr/local/jabber-1.4.2/
export JABBER_DIR
case $1 in
'start' )
su - jabber -c "$JABBER_DIR/jabberd/jabberd &"
;;
'stop' )
kill `cat $JABBER_DIR/jabber.pid`
rm $JABBER_DIR/jabber.pid
;;
*)
echo "usage: `basename $0` {start|stop}"
esac
Back to brandonhutchinson.com.