I want to run /home/myuser/go.py
How do I make that run in the background, everytime my linux machine boots up?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You can put a script in the
/etc/init.d/ directory (eg:
/etc/init.d/go.py) for anything you want to run at bootup time.
There are many ways to do this (depending on which distribution of linux you are using there are different tools that are offered).
The easiest way is simply adding the script to /etc/init.d and then running the command
chmod +x go.py update-rc.d go.py defaults
If you already set up the service, you may also do so via the chkconfig command (that is if the command is available).
In that case, this command should work:
chkconfig --level 35 go.py on
Check out THIS WEBSITE, more specifically the "Using chkconfig to Start Daemons at Each runlevel" and "Using sysv-rc-conf to Start Daemons at Each runlevel" sections.