Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

If you need to run a script when you server boots then you can do the following. I run a few scripts at startup mostly to start the game server and logging.

Write a script. put it in the /etc/init.d/ directory.
if you named the file

% update-rc.d defaults

You also have to make the file you created executable:
chmod +x




First make sure you file works without being in startup. don't use relative paths for the most part.

cp /

chmod +x  /etc/init.d/

update-rc.d defaults

update-rc.d: warning: /etc/init.d/ missing LSB information

update-rc.d: see <>

Adding system startup for /etc/init.d/ ...

/etc/rc0.d/ -> ../init.d/

/etc/rc1.d/ -> ../init.d/

/etc/rc6.d/ -> ../init.d/

/etc/rc2.d/ -> ../init.d/

/etc/rc3.d/ -> ../init.d/

/etc/rc4.d/ -> ../init.d/

/etc/rc5.d/ -> ../init.d/


Even thou you see a warning, I reboot the server and the script runs.


This is the content of my

screen -dmS 'tf2' /steam/orangebox/srcds_run -game tf -autoupdate +map mvm_coaltown +maxplayers 32 -ip