I am trying to get my script to run on startup. I am using Ubuntu Server 16.04.
Here are the exact contents of /etc/r.local.
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. sleep 1 /home/myusername/myscript.sh 15 & exit 0
Here's relevant output from /var/log/syslog, when starting up:
rc.local: /etc/rc.local: 15: /etc/rc.local: /home/myusername/myscript.sh: not found
The script in question has all needed permissions AFAICT.
myusername@myserver:~$ ls -l /home/myusername/myscript.sh -rwxr-xr-x 1 root root 199 Jan 23 09:19 /myusername/myscript.sh
When manually executing rc.local or my script, it runs fine.
What could be some reasons that rc.local can't access the file on startup?