Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  Development/Documentation» Development» Building shell scripts
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: Building shell scripts  (Read 1453 times)
0 Members and 1 Guest are viewing this topic.
ekses_dinajd
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: February 18, 2009, 04:14:35 pm »

Hi!

Does anyone know how to create your own shell script that for example change the rule value from enabled to disabled?? I would like to trigger that script when some ip (for example ip of my gateway) is not available any more, and for result of that i would like to have some rule being disabled so the next rule in order will take place..
I've tried failover methods, but not get them worked, so i would like to try do that manually...

anyone with this kind of knowledge?

Thx!
Logged
cmb
Administrator
Hero Member
*****
Offline Offline

Posts: 6055


View Profile WWW
« Reply #1 on: February 18, 2009, 09:55:15 pm »

I know people have done things of this nature using curl, might search the forum on that to find more info.
Logged

pfSense Commercial Support

Paying customers receive support priority and as in depth of assistance as desired through the official commercial support channels at portal.pfsense.org. Forum users receive as much help as time permits.
tikid
Jr. Member
**
Offline Offline

Posts: 88


View Profile
« Reply #2 on: May 02, 2009, 09:48:29 pm »

Use a php script with the -q argument when calling the interpreter.  Include the config.inc file, and set the variable to whatever you need it to be.  It will reset to the stored value when the router reboots.  The current value will be written to the config if you save any settings.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.03 seconds with 19 queries.