SysV initialization scripts and process controls provide one method of automatically starting and stopping Jabberd 2 when the machine comes up and goes down. This appendix describes how to implement SysV control for Jabberd on the Fedora 1.0 platform. To modify this process for your own distro, please consult your Linux or Unix documentation.
An RC script for Jabberd 2 currently exists in the tools directory of the Jabberd 2 CVS Repository. Download the file jabberd.rc from CVS and copy it to the /etc/rc.d/init.d directory.
Rename the downloaded file to 'jabberd2':
mv -f /etc/rc.d/init.d/jabberd.rc /etc/rc.d/init.d/jabberd2
The RC script file should be executable and owned by root:
chown -f root:root /etc/rc.d/init.d/jabberd2
chmod -f 0755 /etc/rc.d/init.d/jabberd2
You should create start and kill symbolic links in all appropriate run level directories:
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc0.d/K15jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc1.d/K15jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc2.d/S85jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc2.d/K15jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc3.d/S85jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc3.d/K15jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc4.d/S85jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc4.d/K15jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc5.d/S85jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc5.d/K15jabberd2
ln -s /etc/rc.d/init.d/jabberd2 /etc/rc.d/rc6.d/K15jabberd2
You should now be able to test your RC script:
/etc/rc.d/init.d/jabberd2 restart
/etc/rc.d/init.d/jabberd2 restart
The second invocation of restart should all result in [ OK ]. Note that if you execute redhat-config-services from the Fedora gui or execute ntsysv from a Fedora terminal or console session, you will now find jabberd2 in the list of services.
su to the jabber user. Change line 125 of the script to read:
su - jabber -c "${progsPath}/${prog} ${args} & 2> /dev/null"
rc.jabberd for slackware --2004/08/11 15:39 PST
For all the Slackers out there, I created an rc.jabberd script based on the stock jabberd.rc script. It uses killall instead of killproc and processes run as jabber instead of root. Users can find it at http://www.calixto.net/john/rc.jabberd
© 2003 Will Kamishlian and Robert Norris
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
|
|
|
|
![]() |