Hot to run a script upon connecting to the net

Alexander Dalloz ad+lists at uni-x.org
Wed Dec 22 04:04:49 UTC 2004


Am Mi, den 22.12.2004 schrieb Federico Tello Gentile um 5:31:

> A quick look at the archives did not answer my question.
> How can I run a script (with root permission) when I set up ppp0 with my 
> dial up account?
> I use the system-control-network tool to dial up. I see there is a up-ip 
> script in /etc/ppp/ but it is not being called.

If you establish your internet connection with ppp, then
/etc/ppp/ip-up[.local] is executed.

> Any simple way to start the firewall (i.e. run "firestarter start" as 
> root) when the connection is up?

Create /etc/ppp/ip-up.local with content

#!/bin/bash
/path/to/firerstarter-binary start

Make it executable. Create too ip-down.local with same content but
exchange "start" with "stop".

Alexander


-- 
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.9-1.6_FC2smp 
Serendipity 04:58:44 up 11 days, 23:39, load average: 0.53, 0.87, 1.03 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20041222/4136ebb5/attachment-0002.bin 


More information about the users mailing list