Derrick Irwin
New Member
Hello,
I've tried searching for this issue, but I cannot seem to get it right. I am using Ubuntu 14.04 right now, I wrote a script to restart a program/process. It's a .sh script. I was wondering if it was possible to get it to run automatically when a user logs into the system. I've tried to copy it into the /etc/init.d folder using sudo, but it still doesn't seem to run at start up. Also, FYI, when I double click on it and run it as an executable it runs with no problem.
These are the commands I'm trying, but I'm not sure if this is the "old" way of getting a script to run at login:
make your script executable
copy your script to the /etc/init.d/ folder with
sudo cp /path_to_script/script.sh /etc/init.d/
invoke update-rc.d with
sudo update-rc.d script.sh defaults
If anyone has any ideas I would greatly appreciate it.
Thank you!
I've tried searching for this issue, but I cannot seem to get it right. I am using Ubuntu 14.04 right now, I wrote a script to restart a program/process. It's a .sh script. I was wondering if it was possible to get it to run automatically when a user logs into the system. I've tried to copy it into the /etc/init.d folder using sudo, but it still doesn't seem to run at start up. Also, FYI, when I double click on it and run it as an executable it runs with no problem.
These are the commands I'm trying, but I'm not sure if this is the "old" way of getting a script to run at login:
make your script executable
copy your script to the /etc/init.d/ folder with
sudo cp /path_to_script/script.sh /etc/init.d/
invoke update-rc.d with
sudo update-rc.d script.sh defaults
If anyone has any ideas I would greatly appreciate it.
Thank you!