Project

General

Profile

Download (1.13 KB) Statistics
| Branch: | Tag: | Revision:
1 cb7d18d5 Renato Botelho
#!/usr/local/bin/php-cgi -f
2 27f3edf1 Scott Ullrich
<?php
3
/*
4 ac24dc24 Renato Botelho
 * rc.interfaces_wan_configure
5
 *
6
 * part of pfSense (https://www.pfsense.org)
7 b8f91b7c Luiz Souza
 * Copyright (c) 2004-2018 Rubicon Communications, LLC (Netgate)
8 ac24dc24 Renato Botelho
 * All rights reserved.
9
 *
10 b12ea3fb Renato Botelho
 * Licensed under the Apache License, Version 2.0 (the "License");
11
 * you may not use this file except in compliance with the License.
12
 * You may obtain a copy of the License at
13 ac24dc24 Renato Botelho
 *
14 b12ea3fb Renato Botelho
 * http://www.apache.org/licenses/LICENSE-2.0
15 ac24dc24 Renato Botelho
 *
16 b12ea3fb Renato Botelho
 * Unless required by applicable law or agreed to in writing, software
17
 * distributed under the License is distributed on an "AS IS" BASIS,
18
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
 * See the License for the specific language governing permissions and
20
 * limitations under the License.
21 ac24dc24 Renato Botelho
 */
22 27f3edf1 Scott Ullrich
23
require_once("config.inc");
24 483e6de8 Scott Ullrich
require_once("functions.inc");
25 e173dd74 Phil Davis
require_once("filter.inc");
26
require_once("shaper.inc");
27 27f3edf1 Scott Ullrich
28 e173dd74 Phil Davis
if (isset($_GET['interface'])) {
29 c71b14fd Ermal
	$argument = $_GET['interface'];
30 e173dd74 Phil Davis
} else {
31 c71b14fd Ermal
	$argument = str_replace("\n", "", $argv[1]);
32 e173dd74 Phil Davis
}
33
if (empty($argument)) {
34 dea80743 Ermal
	interface_configure("wan");
35 e173dd74 Phil Davis
} else {
36
	if (!empty($config['interfaces'][$argument])) {
37 dea80743 Ermal
		interface_configure($argument);
38 e173dd74 Phil Davis
	}
39 dea80743 Ermal
}
40 27f3edf1 Scott Ullrich
41
?>