Adding autostart script to Debian Linux

Create your script:


#!/bin/sh
mkdir /tmp/spaghetti && touch /tmp/spaghetti/meatballs.txt

Make the script executable:


root@cameron ~ % chmod +x spaghetti.sh

Add your script to /etc/init.d:

root@cameron ~ % mv spaghetti.sh /etc/init.d

Run update-rc.d on the new script:

root@cameron ~ % update-rc.d spaghetti.sh defaults
Advertisements
Adding autostart script to Debian Linux