On Wednesday 17 December 2008, Mathias Carlsson wrote:
Hi!
I haven't found any way to start XYmon automatically at boot time... It need to be started by user hobbit, and when I used update-rc it was added in the startscripts, but I can't figure out how to get it started by user hobbit... Anybody knows how to do this? This is in generally how I add something to the start and stop procedure.
This should work on any linux distribution.
Make a file /etc/init.d/xymon with contents
#!/bin/sh
case "$1" in start) <start command> ;; stop) <stop command> ;; esac
exit 0
Make this file executable and create the needed symlinks:
chmod 755 /etc/init.d/xymon ln -s /etc/init.d/xymon /etc/rc0.d/K09xymon ln -s /etc/init.d/xymon /etc/rc1.d/K09xymon ln -s /etc/init.d/xymon /etc/rc2.d/S91xymon ln -s /etc/init.d/xymon /etc/rc3.d/S91xymon ln -s /etc/init.d/xymon /etc/rc4.d/S91xymon ln -s /etc/init.d/xymon /etc/rc5.d/S91xymon ln -s /etc/init.d/xymon /etc/rc6.d/K09xymon
Stef