Originally Posted by
MK27
You could make up a runlevel script:
Code:
!#/bin/bash
/home/user/C/myserver
A typical runlevel script takes a parameter, which is usually "start" or "stop" (but might also support "reload", "status", "restart" and a few others, but "start" and "stop" are usually required). So a good runlevel script would look like:
Code:
#!/bin/bash
case $1 in
start)
do_startup_stuff
;;
stop)
do_stopping_stuff
;;
esac
The part about linking it into /etc/rc.*/... is perfectly correct though.
EDIT: Some weird Linux distros don't use this system, but most of them do.
EDIT EDIT: The other problem is that runlevel scripts start the processes as root. Sometimes that is not what you want, and you have to play tricks.