I want to launch a shell script every time Debian starts. It should start an application, amongst other things.
Where can I add this information?
I want to launch a shell script every time Debian starts. It should start an application, amongst other things.
Where can I add this information?
Depends on the init
system you use.
Stock Debian ships with sysvinit
as default. If this is your case, write a startup script using /etc/init.d/skeleton
as a template.
Make sure you give it the write owner, group and permissions. You also need to use update-rc.d(8)
to activate the service for future restarts.
Simple solution: put a line calling the script at the end of /etc/rc.local
.
More complex solution: create a proper init script (/etc/init.d/....) and use update-rc.d
as the other answer suggests.