rc.local is not executed on bootup ubuntu
        Posted  
        
            by 
                Alexander
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Alexander
        
        
        
        Published on 2012-03-20T09:30:16Z
        Indexed on 
            2012/03/20
            11:32 UTC
        
        
        Read the original article
        Hit count: 406
        
Im on Ubuntu 10.04. I want to execute script on system boot. I added it to rc.local.
If I execute rc.local manually it works fine. If I boot system in recovery mode(2nd string in boot menu) it also works fine.
But if I boot normally it is not executed. However i added sleep 20 to my script and there is a pause at the end of boot process, but nothing more is executed. Thanks
I think, it soesnt depend on contents of the script but anyway
#!/bin/sh -e
sleep 20
sudo service ssh start
su -c 'service pgsql start' postgres
sudo svnserve -d
su -c 'hamachi start' root
su -c 'hamachi login' root
exit 0
© Server Fault or respective owner