Hi,
Ho do I run a script when my linux PC starts up.
I want to run a script that check some url's when my pc boots.
But it has to be done after the network is setup.
Thanks
Solved: run script on startup
Solved: run script on startup
Last edited by mister_v on Tue Jan 19, 2010 10:46 pm, edited 1 time in total.
Re: run script on startup
On my gentoo box I use
Local should run on start up by default and executes as the last thing.
Just add a line with the command to execute,
or the path to the script to execute.
Code: Select all
/etc/conf.d/local.start
Just add a line with the command to execute,
or the path to the script to execute.
Re: run script on startup
Thanks,
But i don't have the file:
I use Kubuntu 9.10.
Is there another method?
I thought of creating a service in
But i don't have the file:
Code: Select all
/etc/conf.d/local.start
Is there another method?
I thought of creating a service in
Code: Select all
/etc/init.d
Re: run script on startup
To start a script at boot in ubuntu,
you can add a line in
You can also create a service, but that perhaps overkill.
The quick and dirty way to create a service:
you can add a line in
Code: Select all
/etc/rc.local
The quick and dirty way to create a service:
- 1- create a file under init.d : 2- put your command lines/script in the file & save it
Code: Select all
sudo nano /etc/init.d/new_script
3- make the file executable :4- make it run on boot :Code: Select all
sudo chmod +x /etc/init.d/new_script
Code: Select all
sudo update-rc.d new_script defaults
Re: run script on startup
Thanks,
works great.
Code: Select all
/etc/rc.local