On 08/13/2009 02:53 AM, Grant wrote:
Hmmm, it didn't come back up with the server. I have this in
/etc/init.d/rc.local:
#!/sbin/runscript
depend() {
}
start() {
su - user -c /path/to/binary
}
stop() {
}
restart() {
}
I had to start it like I normally do instead:
# su - user
$ /path/to/binary
What could I be missing?
You forgot to start it in the background. Try:
su - user -c /path/to/binary &
If you also want to log its output to a file (say,
/home/user/binary.log) try:
su - user -c /path/to/binary >> /home/user/binary.log 2>&1 &