invoking scripts from rc.local

Nils Kassube kassube at gmx.net
Sun Jul 12 07:02:26 UTC 2009


Admin wrote:
> I am trying to start simplifyserver.sh located in my personal homedir
> from /etc/rc.local but the Simplify server never starts and there is
> no error message.  Any clues what i need to check and/or why this is
> happening and how I can auto execute the Simplify server upon reboot?
>
>
> --- rc.local ---
>
> #!/bin/sh -e
> #
[...]
>
> cd /home/homey/simplifymedia
> ./simplifyserver.sh
> exit 0

Is the script executable? If it isn't, use

chmod +x /home/homey/simplifymedia/simplifyserver.sh

or use

sh ./simplifyserver.sh

in your script. Furthermore you could redirect the output of your script 
to a logfile like this:

./simplifyserver.sh >./simplifyserver.sh.log 2>&1

That would log the output and error-output of the script and maybe you 
get a clue from that.

Finally, as the script is located in your home directory, I suppose you 
don't intend it to run as root. Try to run is as a normal user like 
this:

su homey ./simplifyserver.sh


Nils





More information about the ubuntu-users mailing list