aboutsummaryrefslogtreecommitdiffstats
path: root/packages/ntop/ntop.xml
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-21 04:32:13 +0000
committerColin Smith <colin@pfsense.org>2005-03-21 04:32:13 +0000
commitc34fb5342a439e59323e34185727f182e52801e2 (patch)
tree3484cd4248a3e8a09a325892254e290a0e7dbef7 /packages/ntop/ntop.xml
parent1edd830d8e1dcf41b9f9426e27c387c7b0616f22 (diff)
downloadpfsense-packages-c34fb5342a439e59323e34185727f182e52801e2.tar.gz
pfsense-packages-c34fb5342a439e59323e34185727f182e52801e2.tar.bz2
pfsense-packages-c34fb5342a439e59323e34185727f182e52801e2.zip
Remove unnecessary calls to rm - use unlink_if_exists or rmdir_recursive.
Diffstat (limited to 'packages/ntop/ntop.xml')
-rw-r--r--packages/ntop/ntop.xml14
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/ntop/ntop.xml b/packages/ntop/ntop.xml
index aad1a88d..7689caf6 100644
--- a/packages/ntop/ntop.xml
+++ b/packages/ntop/ntop.xml
@@ -73,18 +73,17 @@
$interfaces = $lan;
}
echo "Using interface(s): " . $interfaces . "\n";
- 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");
+ mwexec("/usr/local/bin/ntop --set-admin-password=" . $_POST['password']);
+ mwexec("killall ntop 2>/dev/null");
$fout = fopen("/usr/local/etc/rc.d/ntop.sh","w");
fwrite($fout, "#!/bin/sh\n\n");
fwrite($fout, "/usr/local/bin/ntop -i " . $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");
+ chmod("/usr/local/etc/rc.d/ntop.sh", 0555);
+ mwexec("killall ntop");
+ mwexec("/usr/local/etc/rc.d/ntop.sh");
} else {
echo "Passwords do not match!";
exit;
@@ -99,11 +98,10 @@
mwexec("/usr/bin/killall ntop");
</custom_php_deinstall_command>
<custom_php_install_command>
- 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 -u root -d --ipv4 -M\n\n");
fclose($fout);
- system("chmod 555 /usr/local/etc/rc.d/ntop.sh");
+ chmod("/usr/local/etc/rc.d/ntop.sh", 0555);
</custom_php_install_command>
</packagegui>