Re: Startup-scripts
*- On 21 Dec, Neil@murphy.debian.org wrote about "Startup-scripts"
> *please CC all replies to me, as I am not subscribed to this list. thanks*
>
> Hello all,
>
> I am using Debian GNU/Linux potato i386. I have written a ipchains
> firewall script that I would like to be executed automatically during
> startup.
>
> Where would I put this (shell) script? I know that Debian has rules
>
> Where would I put this (shell) script? I know that Debian has rules
> about the "proper" way to do certain system config things - what is
> the "proper" way to do this?
>
Put your script in /etc/init.d. Try and make it accept 'start' and
'stop' arguments if appropriate. See /etc/init.d/README and
/etc/init.d/skeleton for an example and pointers to more documentation.
Then run the command:
update-rc.d ipmasq start 41 S .
This will place the appropriate links in the /etc/rcS.d and other
directories, you need to at least start it after the network is
setup(S40).
If you want, install the ipmasq package and look at its startup script
for an example that is probably more in line with what you want(it does
not use the start-stop-daemon program).
Brian Servis
--
------------------------------------------------------------------------
Mechanical Engineering | Never criticize anybody until you
Purdue University | have walked a mile in thei shoes,
servis@purdue.edu | because by that time you will be a
http://www.ecn.purdue.edu/~servis | mile away and have their shoes.
Reply to:
- References:
- Startup-scripts
- From: Neil@murphy.debian.org, Conway <@murphy.debian.org Neil Conway <neilconway@home.com>>