]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - html/cgi-bin/dial.cgi
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/teissler/ipfire-2.x.git] / html / cgi-bin / dial.cgi
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: dial.cgi,v 1.4.2.3 2005/02/22 22:21:55 gespinasse Exp $
10 #
11
12 use strict;
13
14 # enable only the following on debugging purpose
15 #use warnings;
16 #use CGI::Carp 'fatalsToBrowser';
17
18 require 'CONFIG_ROOT/general-functions.pl';
19 require "${General::swroot}/lang.pl";
20 require "${General::swroot}/header.pl";
21
22 my %cgiparams=();
23
24 $cgiparams{'ACTION'} = '';
25 &Header::getcgihash(\%cgiparams);
26
27 if ($cgiparams{'ACTION'} eq $Lang::tr{'dial'}) {
28 system('/etc/rc.d/rc.red','start') == 0
29 or &General::log("Dial failed: $?"); }
30 elsif ($cgiparams{'ACTION'} eq $Lang::tr{'hangup'}) {
31 system('/etc/rc.d/rc.red','stop') == 0
32 or &General::log("Hangup failed: $?"); }
33 sleep 1;
34
35 print "Status: 302 Moved\nLocation: /cgi-bin/index.cgi\n\n";