Hmm. I did not test it but it looks like that it works.
Maybe you can report me if it does. I got it from another board. The root of this script is a bouncer-init-script for debian. In debian there it lies in /etc/init.d/<scriptname> yours seems a redhat one...
use that script of your OWN risk! I did NOT test it! youre testing it, if you try it
so paste that following code into a file "anope" eg: /etc/rc.d/init.d/anope or /etc/init.d/anope
#! /bin/sh
### !!!please edit!!! ###
HOME=/path/to/services
USER=<account which anope services runs on>
## note: in line 19 as you can see, -logchan is enabled.
# remove "-logchan" if you dont want it enabled.
-----------------------------------------------
# do not edit!
DESC="anope IRC services"
NAME=anope
SCRIPTNAME=/etc/init.d/$NAME
do_start()
{
su $USER -c "cd $HOME; ./services -logchan"
}
do_stop()
{
su $USER -c "killall services"
}
case "$1" in
start)
echo "Starting $DESC $NAME"
do_start
;;
stop)
echo "Stopping $DESC $NAME"
do_stop
;;
restart)
echo "Stopping $DESC $NAME"
do_stop
echo "Starting $DESC $NAME"
do_start
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart}"
esac
chmod it executable! (eg: "chmod 700 /etc/rc.d/init.d/anope" )
now you might start/stop /restart anope like a daemon and it might be started at startup. try "/etc/rc.d/init.d/anope start"
but remember: I did not test it!! IT should not crash your machine but it might not work or maybe harm your services-installation, so test it on a testing machine is appreciated. (esp the stop and restart -command may not work as expected)