Thursday, August 9, 2012

Autoexecute a program in Ubuntu at Boot

Assuming you have a script file named "firewall.sh", to automatically execute the file at boot time in Ubuntu, issue the following commands:

# mv firewall.sh /etc/init.d/
# chmod +x /etc/init.d/firewall.sh
# update-rc.d /etc/init.d/firewall.sh defaults


To remove the autoexecute command, type:

# update-rc.d -f /etc/init.d/firewall.sh remove


No comments: