]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/ppp/ip-down
Hab mal alles ein wenig bereinigt, da wir die alten Sachen nichtmehr brauchen...
[people/pmueller/ipfire-2.x.git] / src / ppp / ip-down
CommitLineData
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
12use strict;
13require 'CONFIG_ROOT/general-functions.pl';
14
15&General::log("PPP has gone down on $ARGV[0]");
16
17umask 022;
18
19unlink "${General::swroot}/red/active";
c545beb1 20system "/etc/rc.d/init.d/network red update";
cd1a2927
MT
21
22# Beep when ppp goes up or down. Silence if 'nobeeps' file exists.
23if ( ! -e "${General::swroot}/ppp/nobeeps") {
24 system('/usr/bin/beep','-l 75', '-f 880', '-n', '-l 75', '-f 440');
25}
26
27if ( -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}