Ok, i did the "chmod +x cacti_rrdsvc" and then "dos2unix cacti_rrdsvc".
When I did "chkconfig --add cacti_rrdsvc" i got the following output:
Code: Select all
insserv: warning: script 'S01cacti_rrdsvc' missing LSB tags and overrides
insserv: warning: script 'cacti_rrdsvc' missing LSB tags and overrides
cacti_rrdsvc 0:off 1:off 2:off 3:on 4:off 5:on 6:off
The service itself is running now, but not the server.
Code: Select all
cacti:/etc/init.d/rc5.d # ps -ef | grep boost_server.php
root 19338 6115 0 15:52 pts/0 00:00:00 grep boost_server.php
cacti:/etc/init.d/rc5.d # telnet localhost 9050
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: Connection refused
Code: Select all
cacti:/etc/init.d # php /srv/www/htdocs/cacti/plugins/boost/boost_server.php -d
2008:08:07 13:59:57 - Cacti RRDtool Service Started
but no more response.
Then I realized, that I forgot to change the path (I did it once, but then overwrote the file again when upgraded to Boost SVN). So I edited the file with my cacti path, but the result ist the same.
After dos2unix, my cacti_rrdsvc looks like:
Code: Select all
#!/bin/bash
# [comments]
PROGPATH="/srv/www/htdocs/cacti/plugins/boost/"
PROG="boost_server.php"
[ -f $PROGPATH$PROG ] || exit 0
RETVAL=0
start() {
echo -n $"Starting Cacti RRDTool Process: "
if [ -e /var/lock/subsys/$PROG ]; then
echo " [ ESC[31;01mFAILESC[m ]"
else
$PROGPATH$PROG > /dev/null 2>&1 &
touch /var/lock/subsys/$PROG
echo " [ ESC[32;01m OK ESC[m ]"
fi
return 0
}
stop() {
echo -n $"Stopping Cacti RRDTool Process: "
if [ -e /var/lock/subsys/$PROG ]; then
killall $PROG > /dev/null 2>&1
rm -f /var/lock/subsys/$PROG > /dev/null 2>&1
echo " [ ESC[32;01m OK ESC[m ]"
else
echo " [ ESC[31;01mFAILESC[m ]"
fi
return 0
}
restart() {
stop
start
}
status() {
echo -n $"Status of Cacti RRDTool Process: "
if [ -e /var/lock/subsys/$PROG ]; then
echo "running ..."
else
echo "down"
fi
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $?
How can I cleanly unistall the service, to try again? Was the dos2unix conversion correct?