aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-06 18:56:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-06 18:56:42 +0000
commite7a94705c421e580042468d13f3325f3ee886503 (patch)
treeacd0dfcb7706e8dfe2aad6e03175855c0e415167 /packages
parent10dca2e48050daf3090e9561ed18c14ca890cf70 (diff)
downloadpfsense-packages-e7a94705c421e580042468d13f3325f3ee886503.tar.gz
pfsense-packages-e7a94705c421e580042468d13f3325f3ee886503.tar.bz2
pfsense-packages-e7a94705c421e580042468d13f3325f3ee886503.zip
Output header when preouput is set.
Diffstat (limited to 'packages')
-rw-r--r--packages/ntop/ntop.xml59
1 files changed, 30 insertions, 29 deletions
diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml
index 6badf9b9..9b8e4482 100644
--- a/packages/ntop/ntop.xml
+++ b/packages/ntop/ntop.xml
@@ -54,36 +54,37 @@
</fields>
<custom_add_php_command>
function sync_package_ntop() {
- conf_mount_rw();
- config_lock();
- if($_POST == "") $_POST = $config['installedpackages']['ntop']['config'];
- if($_POST['password'] == $_POST['passwordagain']) {
- $interfaces = " -i ";
- $ifaces=$_POST['iface'];
- $isfirst = 0;
- foreach($ifaces as $element=>$if)
- {
- if($isfirst == 1) $interfaces .= ",";
- $interfaces .= convert_friendly_interface_to_real_interface_name($ifaces[$element]);
- $isfirst = 1;
- }
- system("/usr/local/bin/ntop --set-admin-password=" . $_POST['password']);
- system("killall ntop 2>/dev/null");
- system("rm /usr/local/etc/rc.d/ntop.sh");
- $fout = fopen("/usr/local/etc/rc.d/ntop.sh","w");
- fwrite($fout, "#!/bin/sh\n\n");
- fwrite($fout, "/usr/local/bin/ntop " . $interfaces . " -u root -d --ipv4 -M\n\n");
- fclose($fout);
- conf_mount_ro();
- config_unlock();
- system("chmod 555 /usr/local/etc/rc.d/ntop.sh");
- system("killall ntop 2>/dev/null");
- system("/usr/local/etc/rc.d/ntop.sh");
- } else {
- echo "Passwords do not match!";
- exit;
- }
+ conf_mount_rw();
+ config_lock();
+ if($_POST == "") $_POST = $config['installedpackages']['ntop']['config'];
+ if($_POST['password'] == $_POST['passwordagain']) {
+ $interfaces = " -i ";
+ $ifaces=$_POST['iface'];
+ $isfirst = 0;
+ foreach($ifaces as $element=>$if)
+ {
+ if($isfirst == 1) $interfaces .= ",";
+ $interfaces .= convert_friendly_interface_to_real_interface_name($ifaces[$element]);
+ $isfirst = 1;
+ }
+ system("/usr/local/bin/ntop --set-admin-password=" . $_POST['password']);
+ system("killall ntop 2>/dev/null");
+ system("rm /usr/local/etc/rc.d/ntop.sh");
+ $fout = fopen("/usr/local/etc/rc.d/ntop.sh","w");
+ fwrite($fout, "#!/bin/sh\n\n");
+ fwrite($fout, "/usr/local/bin/ntop " . $interfaces . " -u root -d --ipv4 -M\n\n");
+ fclose($fout);
+ conf_mount_ro();
+ config_unlock();
+ system("chmod 555 /usr/local/etc/rc.d/ntop.sh");
+ system("killall ntop 2>/dev/null");
+ system("/usr/local/etc/rc.d/ntop.sh");
+ } else {
+ echo "Passwords do not match!";
+ exit;
+ }
}
+ sync_package_ntop();
</custom_add_php_command>
<custom_php_resync_command>
sync_package_ntop();