Why not add a chkconfig line to the script and let 'chkconfig --add imapd' after copying the script to /etc/rc.d/init.d/imapd. You can then use chkconfig to do all of the messy stuff with links and can use chkconfig to turn off/on the script at will...
Example of chkconfig line: # chkconfig: 2345 55 25 # description: Cyrus IMAPD the chkconfig line is: runlevel(s) start-priority stop-priority So, adding the above would create links in /etc/rc.d/rc[0-6].d to start server in levels 2,3,4,5 and stop in levels 0,1,6. On Fri, 8 Mar 2002, Darin Perusich wrote: > Date: Fri, 08 Mar 2002 13:52:18 +0000 > From: Darin Perusich <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: starting cyrus at boot? > > here's a script i use for starting/stopping/restart cyrus on my redhat > server. > > copy and paste this into a file in /etc/init.d or /etc/rc.d/init.d > depending on you system, call the file cyrus or whatever makes you > happy. > > chown root.root /etc/init.d/cyrus > chmod u+x /etc/init.d/cyrus > cd /etc/rc3.d > ln -s ../init.d/cyrus S99cyrus > ln -s ../init.d/cyrus K99cyrus > > you might need to modify some of the path names if you've installed > cyrus outside of the default locations. if you where running this on a > solaris 7 or 8 system you could use /usr/bin/pkill instead of > /usr/bin/killall and you'd want to place the rc script in /etc/rc2.d > instead of rc3.d. > > enjoy > > --BEGIN COPY-- > #!/bin/sh > # > # Start/Shut for cyrus master server process > # > > case "$1" in > 'start') > if [ -f /etc/cyrus.conf ] ; then > echo "Starting Cyrus Master Process" > /usr/cyrus/bin/master 1> /dev/console 2>&1 & > fi > ;; > > 'stop') > echo "Shutting down Cyrus Master Process" > /usr/bin/killall master 1>/dev/console 2>&1 > ;; > > 'restart') > echo "Restarting Cyrus Master Process" > /usr/bin/killall -HUP master 1>/dev/console 2>&1 > ;; > > *) > echo "Usage: $0 { start | restart | stop }" > ;; > esac > exit 0 > > --END COPY-- > > Jeff Bert wrote: > > > > I know this is a newbie question but with all I had to do to get cyrus > > installed my brain hurts... what's a good way to get cyrus started at boot? > > > > thanks, > > > > Jeff > >