]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | #!/usr/bin/perl |
2 | # | |
3 | # SmoothWall CGIs | |
4 | # | |
5 | # This code is distributed under the terms of the GPL | |
6 | # | |
7 | # (c) The SmoothWall Team | |
8 | # | |
9 | # $Id: ip-down,v 1.3.2.9 2005/01/26 12:23:26 riddles Exp $ | |
10 | # | |
11 | ||
12 | use strict; | |
13 | require 'CONFIG_ROOT/general-functions.pl'; | |
14 | ||
15 | &General::log("PPP has gone down on $ARGV[0]"); | |
16 | ||
17 | umask 022; | |
18 | ||
19 | unlink "${General::swroot}/red/active"; | |
3e615c37 | 20 | system "/etc/rc.d/init.d/net/red/update"; |
cd1a2927 MT |
21 | |
22 | # Beep when ppp goes up or down. Silence if 'nobeeps' file exists. | |
23 | if ( ! -e "${General::swroot}/ppp/nobeeps") { | |
24 | system('/usr/bin/beep','-l 75', '-f 880', '-n', '-l 75', '-f 440'); | |
25 | } | |
26 | ||
27 | if ( -e "${General::swroot}/red/keepconnected") { | |
28 | if ( system ('/bin/ps ax | /bin/grep -q "[r]c.connectioncheck reconnect"') ) { | |
c545beb1 | 29 | system ('/etc/rc.d/init.d/connectioncheck reconnect &'); |
cd1a2927 | 30 | } else { |
c545beb1 | 31 | &General::log ('connectioncheck reconnect already running'); |
cd1a2927 MT |
32 | } |
33 | } |