Created
September 1, 2012 17:40
-
-
Save attomos/3581313 to your computer and use it in GitHub Desktop.
Execute shell script or python script on startup (Ubuntu). Assume that you save dosomething.sh at ~/Desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Really do some thing" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod +x ~/Desktop/dosomething.sh | |
cd /etc/init.d | |
sudo ln -s ~/Desktop/dosomething.sh | |
sudo update-rc.d dosomething.sh defaults | |
# restart the operating system and check whether it's running or not | |
ps -ef | grep dosomething.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment