]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | #!/usr/bin/perl\r |
2 | #\r | |
3 | # SmoothWall CGIs\r | |
4 | #\r | |
5 | # This code is distributed under the terms of the GPL\r | |
6 | #\r | |
7 | # (c) The SmoothWall Team\r | |
8 | #\r | |
9 | # $Id: dial.cgi,v 1.4.2.3 2005/02/22 22:21:55 gespinasse Exp $\r | |
10 | #\r | |
11 | \r | |
12 | use strict;\r | |
13 | \r | |
14 | # enable only the following on debugging purpose\r | |
15 | #use warnings;\r | |
16 | #use CGI::Carp 'fatalsToBrowser';\r | |
17 | \r | |
18 | require 'CONFIG_ROOT/general-functions.pl';\r | |
19 | require "${General::swroot}/lang.pl";\r | |
20 | require "${General::swroot}/header.pl";\r | |
21 | \r | |
22 | my %cgiparams=();\r | |
23 | \r | |
24 | $cgiparams{'ACTION'} = '';\r | |
25 | &Header::getcgihash(\%cgiparams);\r | |
26 | \r | |
27 | if ($cgiparams{'ACTION'} eq $Lang::tr{'dial'}) {\r | |
28 | system('/etc/rc.d/rc.red','start') == 0\r | |
29 | or &General::log("Dial failed: $?"); }\r | |
30 | elsif ($cgiparams{'ACTION'} eq $Lang::tr{'hangup'}) {\r | |
31 | system('/etc/rc.d/rc.red','stop') == 0\r | |
32 | or &General::log("Hangup failed: $?"); }\r | |
33 | sleep 1;\r | |
34 | \r | |
35 | print "Status: 302 Moved\nLocation: /cgi-bin/index.cgi\n\n";\r |