Commit a47ad5e7 authored by Franco Fichtner's avatar Franco Fichtner

src: prune, prettify or zap scripts that use PHP shebang

parent cabdbf8c
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
ini_set("max_execution_time", "0");
......
#!/usr/local/bin/php -q
#!/usr/local/bin/php
<?php
/* $Id$ */
/*
captiveportal_gather_stats.php
Copyright (C) 2011 Warren Baker
All rights reserved.
......@@ -108,5 +107,3 @@ if ($type == "loggedin") {
$result = $no_users;
echo "$result";
?>
#!/usr/local/bin/php -q
<?php
/*
easyrule CLI Program
Copyright (C) 2010 Jim Pingle (jpingle@gmail.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("pfsense-utils.inc");
require_once("easyrule.inc");
require_once("filter.inc");
require_once("shaper.inc");
$message = "";
$specialsrcdst = explode(" ", "any pptp pppoe l2tp openvpn");
$ifdisp = get_configured_interface_with_descr();
foreach ($ifdisp as $kif => $kdescr) {
$specialsrcdst[] = "{$kif}";
$specialsrcdst[] = "{$kif}ip";
}
/* Borrow this function from guiconfig.inc since we can't include it for use at the CLI
- Maybe these need to be moved to util.inc or pfsense-utils.inc?
*/
function pconfig_to_address(&$adr, $padr, $pmask, $pnot=false, $pbeginport=0, $pendport=0) {
$adr = array();
if ($padr == "any")
$adr['any'] = true;
else if (is_specialnet($padr))
$adr['network'] = $padr;
else {
$adr['address'] = $padr;
if ($pmask != 32)
$adr['address'] .= "/" . $pmask;
}
if ($pnot)
$adr['not'] = true;
else
unset($adr['not']);
if (($pbeginport != 0) && ($pbeginport != "any")) {
if ($pbeginport != $pendport)
$adr['port'] = $pbeginport . "-" . $pendport;
else
$adr['port'] = $pbeginport;
}
if(is_alias($pbeginport)) {
$adr['port'] = $pbeginport;
}
}
/* Borrow this one from guiconfig.inc also */
function is_specialnet($net) {
global $specialsrcdst;
if(!$net)
return false;
if (in_array($net, $specialsrcdst))
return true;
else
return false;
}
if (($argc > 1) && !empty($argv[1])) {
$message = "";
switch ($argv[1]) {
case 'block':
$message = easyrule_parse_block($argv[2], $argv[3]);
break;
case 'pass':
$message = easyrule_parse_pass($argv[2], $argv[3], $argv[4], $argv[5], $argv[6]);
break;
}
echo $message . "\n";
} else {
// Print usage:
echo "usage:\n";
echo " Blocking only requires an IP to block\n";
echo " " . basename($argv[0]) . " block <interface> <source IP>\n";
echo "\n";
echo " Passing requires more detail, as it must be as specific as possible. The destination port is optional if you're using a protocol without a port (e.g. ICMP, OSPF, etc).\n";
echo " " . basename($argv[0]) . " pass <interface> <protocol> <source IP> <destination ip> [destination port]\n";
echo "\n";
echo " Block example:\n";
echo " " . basename($argv[0]) . " block wan 1.2.3.4\n";
echo "\n";
echo " Pass example (protocol with port):\n";
echo " " . basename($argv[0]) . " pass wan tcp 1.2.3.4 192.168.0.4 80\n";
echo "\n";
echo " Pass example (protocol without port):\n";
echo " " . basename($argv[0]) . " pass wan icmp 1.2.3.4 192.168.0.4\n";
echo "\n";
}
?>
#!/usr/local/bin/php -q
<?php
/* $Id$ */
/*
filterparser.php
part of pfSesne by Scott Ullrich
originally based on m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2009 Jim Pingle <myfirstname>@<mylastname>.org
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
A quick CLI log parser.
Examples:
clog /var/log/filter.log | tail -50 | /usr/local/www/filterparser.php
clog -f /var/log/filter.log | /usr/local/www/filterparser.php
*/
/*
pfSense_MODULE: logs
*/
include_once("functions.inc");
include_once("filter_log.inc");
$log = fopen("php://stdin", "r");
$lastline = "";
while(!feof($log)) {
$line = fgets($log);
$line = rtrim($line);
$flent = parse_filter_line(trim($line));
if ($flent != "") {
$flags = (($flent['proto'] == "TCP") && !empty($flent['tcpflags'])) ? ":" . $flent['tcpflags'] : "";
echo "{$flent['time']} {$flent['act']} {$flent['realint']} {$flent['proto']}{$flags} {$flent['src']} {$flent['dst']}\n";
$flent = "";
}
}
fclose($log); ?>
#!/usr/local/bin/php -q
<?php
require_once("config.inc");
require_once("globals.inc");
require_once("notices.inc");
$options = getopt("s::");
$message = "";
if($options['s'] <> "") {
$subject = $options['s'];
}
$in = file("php://stdin");
foreach($in as $line){
$message .= "$line";
}
if (!empty($subject))
send_smtp_message($message, $subject);
else
send_smtp_message($message);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......@@ -155,5 +155,3 @@ if (isset($_GET['username']))
echo "OK";
else
exit(0);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......@@ -68,5 +68,3 @@ if (isset($allowed_depth) && ($cert_depth > $allowed_depth)) {
closelog();
exit(0);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/* $Id$ */
/*
rc.carpdown
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/* $Id$ */
/*
rc.carpup
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/* $Id$ */
/*
rc.exireaccounts
part of pfSense
/*
Copyright (C) 2009 Shrew Soft Inc.
All rights reserved.
......@@ -30,37 +27,37 @@
POSSIBILITY OF SUCH DAMAGE.
*/
require_once("config.inc");
require_once("functions.inc");
$removed = 0;
if (!is_array($config['system']['user']))
return;
$count = count($config['system']['user']);
$index = 0;
for(; $index < $count; $index++) {
$user =& $config['system']['user'][$index];
if($user['scope'] == "system")
continue;
echo "1\n";
echo "User {$user['name']} expires {$user['expires']}\n";
if(!$user['expires'] || isset($user['disabled']))
continue;
echo "1\n";
if(strtotime("-1 day") > strtotime($user['expires'])) {
echo "Disabling user {$user['name']} at index #{$index}\n";
//unset($config['system']['user'][$index]);
$user['disabled'] = true;
$removed++;
$count--;
$index--;
}
require_once("config.inc");
require_once("functions.inc");
$removed = 0;
if (!is_array($config['system']['user'])) {
return;
}
$count = count($config['system']['user']);
$index = 0;
for (; $index < $count; $index++) {
$user =& $config['system']['user'][$index];
if($user['scope'] == "system")
continue;
echo "1\n";
echo "User {$user['name']} expires {$user['expires']}\n";
if(!$user['expires'] || isset($user['disabled']))
continue;
echo "1\n";
if(strtotime("-1 day") > strtotime($user['expires'])) {
echo "Disabling user {$user['name']} at index #{$index}\n";
//unset($config['system']['user'][$index]);
$user['disabled'] = true;
$removed++;
$count--;
$index--;
}
}
if($removed > 0)
write_config("Expired {$removed} user accounts");
//print_r($config);
?>
if ($removed > 0) {
write_config("Expired {$removed} user accounts");
}
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2004-2006 Scott Ullrich
Copyright (C) 2005 Bill Marquette
Copyright (C) 2006 Peter Allgeyer
Copyright (C) 2008 Ermal Luci
All rights reserved.
originally part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2005 Bill Marquette
Copyright (C) 2006 Peter Allgeyer
Copyright (C) 2008 Ermal Luci
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -42,12 +39,10 @@ require_once("filter.inc");
require_once("shaper.inc");
require_once("xmlrpc.inc");
require_once("interfaces.inc");
require_once("openvpn.inc");
system_routing_configure();
setup_gateways_monitor();
relayd_configure();
require_once("openvpn.inc");
openvpn_resync_all();
services_dhcpd_configure();
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......@@ -432,5 +432,3 @@ if (is_array($config['hasync'])) {
$numberofruns = 3;
}
}
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/* $Id$ */
/*
rc.initial.defaults
part of m0n0wall (http://m0n0.ch/wall)
/*
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -30,14 +27,14 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
require_once("util.inc");
require_once("config.lib.inc");
require_once("functions.inc");
/* parse the configuration and include all functions used below */
require_once("util.inc");
require_once("config.lib.inc");
require_once("functions.inc");
$fp = fopen('php://stdin', 'r');
$fp = fopen('php://stdin', 'r');
echo <<<EOD
echo <<<EOD
You are about to reset the firewall to factory defaults.
The firewall will reboot after resetting the configuration.
......@@ -45,18 +42,17 @@ The firewall will reboot after resetting the configuration.
Do you want to proceed [y|n]?
EOD;
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
reset_factory_defaults();
reset_factory_defaults();
echo <<<EOD
echo <<<EOD
{$g['product_name']} is rebooting now.
EOD;
system_reboot_sync();
}
system_reboot_sync();
}
fclose($fp);
?>
fclose($fp);
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -29,26 +27,25 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
require_once("config.inc");
require_once("functions.inc");
$fp = fopen('php://stdin', 'r');
echo "\nEnter a host name or IP address: ";
$pinghost = chop(fgets($fp));
if (is_ipaddrv4($pinghost) || is_hostname($pinghost)) {
$command = "ping";
} elseif (is_ipaddrv6($pinghost)) {
$command = "ping6";
}
if ($command) {
echo "\n";
passthru("/sbin/{$command} -c 3 -n " . escapeshellarg($pinghost));
echo "\nPress ENTER to continue.\n";
fgets($fp);
}
fclose($fp);
?>
/* parse the configuration and include all functions used below */
require_once("config.inc");
require_once("functions.inc");
$fp = fopen('php://stdin', 'r');
echo "\nEnter a host name or IP address: ";
$pinghost = chop(fgets($fp));
if (is_ipaddrv4($pinghost) || is_hostname($pinghost)) {
$command = "ping";
} elseif (is_ipaddrv6($pinghost)) {
$command = "ping6";
}
if ($command) {
echo "\n";
passthru("/sbin/{$command} -c 3 -n " . escapeshellarg($pinghost));
echo "\nPress ENTER to continue.\n";
fgets($fp);
}
fclose($fp);
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -q
#!/usr/local/bin/php
<?php
/*
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -29,8 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
$options = getopt("hn", array("dry-run", "help"));
if (isset($options["h"]) || isset($options["help"])) {
......@@ -45,8 +41,6 @@ if ($dry_run) {
echo "DRY RUN MODE IS ON\n";
}
/* parse the configuration and include all functions used below */
require_once("config.inc");
require_once("functions.inc");
......@@ -528,5 +522,3 @@ echo "\n" . gettext('Press <ENTER> to continue.');
fgets($fp);
fclose($fp);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -29,22 +27,17 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
require_once("config.inc");
require_once("config.console.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("ipsec.inc");
require_once("vpn.inc");
require_once("captiveportal.inc");
require_once("rrd.inc");
set_networking_interfaces_ports();
reload_interfaces_sync();
/* reload graphing functions */
enable_rrd_graphing();
?>
/* parse the configuration and include all functions used below */
require_once("config.inc");
require_once("config.console.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("ipsec.inc");
require_once("vpn.inc");
require_once("captiveportal.inc");
require_once("rrd.inc");
set_networking_interfaces_ports();
reload_interfaces_sync();
enable_rrd_graphing();
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2013 Renato Botelho (garga@pfsense.org)
part of pfSense (https://www.pfsense.org)
Copyright (C) 2013 Renato Botelho <garga@pfsense.org>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense
Copyright (C) 2003-2005 Scott Ullrich <sullrich@gmail.com>.
All rights reserved.
......@@ -83,7 +81,6 @@ function handle_argument_group($iface, $argument2) {
}
}
global $g;
if (!file_exists("/var/run/booting")) {
if (isset($_GET)) {
if (!empty($_GET['interface']))
......@@ -92,22 +89,21 @@ if (!file_exists("/var/run/booting")) {
if ($argc < 3) {
log_error("HOTPLUG event: The number of required parameters not passed!");
exit;
}
$action = $argv[1];
switch($action) {
case "start":
case "stop":
break;
default:
log_error("HOTPLUG event: The action parameter passed is wrong($action) only start/stop/up/down are allowed!");
exit;
/* NOTREACHED */
break;
}
$interface = convert_real_interface_to_friendly_interface_name($argv[2]);
if (!empty($interface)) {
handle_argument_group($interface, $action);
}
}
$action = $argv[1];
switch($action) {
case "start":
case "stop":
break;
default:
log_error("HOTPLUG event: The action parameter passed is wrong($action) only start/stop/up/down are allowed!");
exit;
/* NOTREACHED */
break;
}
$interface = convert_real_interface_to_friendly_interface_name($argv[2]);
if (!empty($interface))
handle_argument_group($interface, $action);
}
}
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......@@ -57,4 +57,3 @@ if (isset($config['ipsec']['failoverforcereload']))
vpn_ipsec_force_reload();
unlock($ipseclck);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......@@ -55,4 +55,3 @@ $routelck = lock('routedns', LOCK_EX);
system_staticroutes_configure();
unlock($routelck);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -219,5 +219,3 @@ if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interface
/* signal filter reload */
filter_configure();
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
rc.newwanipv6
Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
part of pfSense (https://www.pfsense.org)
Originally part of m0n0wall (http://m0n0.ch)
/*
Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -173,5 +170,3 @@ enable_rrd_graphing();
services_igmpproxy_configure();
restart_packages();
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2007 Manuel Kasper <mk@neon1.net>.
Copyright (C) 2009 Seth Mos <seth.mos@dds.nl>.
All rights reserved.
......@@ -125,4 +124,3 @@ foreach ($arg_array as $arg_element) {
}
unlock($openvpnlck);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......@@ -36,5 +36,5 @@ if ($passed_tests) {
exit(0);
}
// Tests failed.
echo 'FAILED';
exit(1);
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of pfSense (https://www.pfsense.org)
Copyright (C) 2004 Scott Ullrich
All rights reserved.
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2010 Ermal Luçi
All rights reserved.
......@@ -31,5 +32,3 @@ require_once("config.inc");
require_once("functions.inc");
system_resolvconf_generate(true);
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
require_once("config.inc");
......
#!/usr/local/bin/php -q
#!/usr/local/bin/php
<?php
require_once('config.inc');
cleanup_backupcache();
......@@ -122,5 +123,3 @@ while (true) {
}
fclose($fp);
die;
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
part of m0n0wall (http://m0n0.ch/wall)
/*
Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
All rights reserved.
......@@ -28,13 +27,11 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
require_once("config.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("captiveportal.inc");
require_once("voucher.inc");
require_once("config.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("captiveportal.inc");
require_once("voucher.inc");
voucher_save_db_to_config();
?>
voucher_save_db_to_config();
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
......@@ -68,5 +68,3 @@ if ($shell) {
pclose($shell);
}
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
require_once("pkg-utils.inc");
stop_packages();
?>
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/* $Id$ */
/*
rc.update_alias_url-data.sh
part of pfSense (https://www.pfsense.org)
/*
Copyright (C) 2010 Scott Ullrich <sullrich@gmail.com>
All rights reserved.
......@@ -30,9 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/* parse the configuration and include all functions used below */
/* config.inc retrives the util.inc and globals.inc */
require_once("config.inc");
require_once("functions.inc");
......@@ -40,4 +34,3 @@ if (update_alias_url_data()) {
write_config();
send_event("filter reload");
}
?>
#!/usr/local/bin/php -q
#!/usr/local/bin/php
<?php
require_once("config.inc");
......@@ -56,4 +56,3 @@ if (count($todo) > 0) {
if ($filter_reload)
send_event("filter reload");
}
?>
......@@ -66,9 +66,3 @@ else:
print (data[:-3])
finally:
sock.close()
......@@ -76,6 +76,3 @@ try:
print ('response:%s'% data[:-3] )
finally:
sock.close()
#!/usr/local/bin/php -f
#!/usr/local/bin/php
<?php
/*
gmirror_status_check.php
Copyright (C) 2014 Jim Pingle
Redistribution and use in source and binary forms, with or without
......@@ -26,12 +26,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES: /sbin/gmirror /sbin/geom /usr/bin/grep /usr/bin/egrep /usr/bin/cut /usr/bin/head
pfSense_BUILDER_BINARIES: /sbin/mount /usr/bin/awk /usr/bin/sed
pfSense_MODULE: gmirror
*/
require_once("config.inc");
require_once("notices.inc");
require_once("globals.inc");
......@@ -88,5 +82,3 @@ if (count($notices)) {
// Write out current status if changed
if ($mirror_status != $previous_mirror_status)
file_put_contents($status_file, serialize($mirror_status));
?>
#!/usr/local/bin/php -q
<?php
$last_text = "";
while(!stristr($status, "Done")) {
$status = get_status();
if($status <> "") {
echo $status . "\n";
}
sleep(1);
}
function get_status() {
global $last_text;
$status = file_get_contents("/var/run/filter_reload_status");
$status = str_replace("...", "", $status);
$status .= "...";
if($status <> $last_text) {
$last_text = $status;
return $status;
}
return "";
}
?>
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
......
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2004, 2005 Scott Ullrich
......@@ -34,7 +34,8 @@ header("Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", FALSE );
header("Pragma: no-cache"); // HTTP/1.0
require("guiconfig.inc");
require_once("guiconfig.inc");
class QueueStats {
public $queuename;
public $queuelength;
......@@ -306,4 +307,3 @@ function format_bits($bits) {
return sprintf("%d bps", $bits);
}
}
?>
#!/usr/local/bin/php
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
......@@ -27,8 +27,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
require("guiconfig.inc");
require_once("guiconfig.inc");
header("Content-Type: text/plain");
......@@ -52,4 +51,3 @@ if ($_POST['config']) {
}
exit(0);
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment