aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/hula.xml7
-rw-r--r--packages/ifstated.xml1
-rw-r--r--packages/ntop/ntop.xml14
-rw-r--r--packages/pfstat.xml4
-rw-r--r--packages/powerdns.xml2
-rw-r--r--packages/pure-ftpd.xml9
-rw-r--r--packages/pure-ftpdsettings.xml2
-rw-r--r--packages/siproxd.xml1
-rw-r--r--packages/spamd.xml3
-rw-r--r--packages/stunnel.xml4
10 files changed, 21 insertions, 26 deletions
diff --git a/packages/hula.xml b/packages/hula.xml
index b76ddacb..b945e023 100644
--- a/packages/hula.xml
+++ b/packages/hula.xml
@@ -47,12 +47,11 @@
config_unlock();
</custom_add_php_command>
<custom_php_deinstall_command>
- system("/usr/bin/killall -9 hulamanager");
- system("rm -rf /usr/local/hula");
- system("rm /usr/local/etc/rc.d/hula.sh");
+ mwexec("/usr/bin/killall -9 hulamanager");
+ rmdir_recursive("/usr/local/hula");
+ unlink_if_exists("/usr/local/etc/rc.d/hula.sh");
</custom_php_deinstall_command>
<custom_php_install_command>
- system("rm /usr/local/etc/rc.d/hula.sh");
$fout = fopen("/usr/local/etc/rc.d/hula.sh","w");
fwrite($fout, "#!/bin/sh\n\n");
fwrite($fout, "/sbin/mount -t linprocfs linprocfs /proc\n");
diff --git a/packages/ifstated.xml b/packages/ifstated.xml
index d5901412..df60345c 100644
--- a/packages/ifstated.xml
+++ b/packages/ifstated.xml
@@ -61,7 +61,6 @@
</fields>
<custom_php_install_command>
global $config;
- mwexec("rm /usr/local/etc/rc.d/ifstated*");
$fout = fopen("/usr/local/etc/rc.d/ifstated.sh","w");
fwrite($fout,"#!/bin/sh\n\n/usr/local/sbin/ifstated\n");
fclose($fout);
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>
diff --git a/packages/pfstat.xml b/packages/pfstat.xml
index ec4756fd..a4cbb1ee 100644
--- a/packages/pfstat.xml
+++ b/packages/pfstat.xml
@@ -268,8 +268,8 @@
system("/usr/sbin/cron 2>/dev/null");
</custom_php_install_command>
<custom_php_deinstall_command>
- system("rm /usr/local/etc/pfstat 2>/dev/null");
- system("rm -rf /usr/local/www/pfstat* 2>/dev/null");
+ unlink_if_exists("/usr/local/etc/pfstat");
+ rmdir_recursive("/usr/local/www/pfstat");
</custom_php_deinstall_command>
<!--
<custom_php_install_command>
diff --git a/packages/powerdns.xml b/packages/powerdns.xml
index 5820c41c..fc663821 100644
--- a/packages/powerdns.xml
+++ b/packages/powerdns.xml
@@ -61,7 +61,7 @@
</fields>
<custom_php_deinstall_command>
system("/usr/local/bin/pg_ctl -m immediate");
- system("rm -rf /usr/local/pgsql");
+ rmdir_recursive("/usr/local/pgsql");
system("/usr/sbin/pw userdel pgsql");
system("/usr/bin/killall -9 postgres");
echo "&lt;p&gt;";
diff --git a/packages/pure-ftpd.xml b/packages/pure-ftpd.xml
index 5de2de8a..c1c4cbf9 100644
--- a/packages/pure-ftpd.xml
+++ b/packages/pure-ftpd.xml
@@ -67,18 +67,17 @@
</field>
</fields>
<custom_php_install_command>
- mwexec("/bin/rm /usr/local/etc/rc.d/pure-ftp*");
$fout = fopen("/usr/local/etc/rc.d/pure-ftpd.sh","w");
fwrite($fout, "#!/bin/sh\n\n");
fwrite($fout, "/usr/local/sbin/pure-ftpd -A -B /usr/local/etc/pure-ftpd.conf\n");
fclose($fout);
- mwexec("/bin/chmod a+x /usr/local/etc/rc.d/pure-ftpd.sh");
+ chmod("/usr/local/etc/rc.d/pure-ftpd.sh", 0755);
mwexec("/usr/local/etc/rc.d/pure-ftpd.sh");
</custom_php_install_command>
<custom_php_deinstall_command>
mwexec("/usr/bin/killall pure-ftpd");
- system("/bin/rm -rf /usr/local/etc/pure*");
- system("/bin/rm -rf /usr/local/etc/rc.d/pure*");
+ rmdir_recursive("/usr/local/etc/pure*");
+ rmdir_recursive("/usr/local/etc/rc.d/pure*");
</custom_php_deinstall_command>
<custom_add_php_command>
conf_mount_rw();
@@ -97,7 +96,7 @@
$savemsg = "User has been added.";
</custom_add_php_command>
<custom_delete_php_command>
- system("/bin/rm -rf /home/" . $username);
+ rmdir_recursive("/home/" . $username);
system("/usr/sbin/pw userdel " . $username);
</custom_delete_php_command>
</packagegui>
diff --git a/packages/pure-ftpdsettings.xml b/packages/pure-ftpdsettings.xml
index 1fe39d9b..a58b0651 100644
--- a/packages/pure-ftpdsettings.xml
+++ b/packages/pure-ftpdsettings.xml
@@ -89,7 +89,7 @@
<custom_add_php_command>
conf_mount_rw();
config_lock();
- mwexec("rm /usr/local/etc/rc.d/pure-ftp*");
+ unlink_if_exists("/usr/local/etc/rc.d/pure-ftp*");
$fout = fopen("/usr/local/etc/rc.d/pure-ftpd.sh","w");
fwrite($fout, "#!/bin/sh\n\n");
$startline = "/usr/local/sbin/pure-ftpd";
diff --git a/packages/siproxd.xml b/packages/siproxd.xml
index 132e0e94..c20ec7a4 100644
--- a/packages/siproxd.xml
+++ b/packages/siproxd.xml
@@ -105,7 +105,6 @@
</fields>
<custom_php_install_command>
mwexec("pkg_add -rv libosip2");
- mwexec("rm /usr/local/etc/rc.d/siproxd.sh");
$fout = fopen("/usr/local/etc/rc.d/siproxd.sh","w");
fwrite($fout, "#!/bin/sh\n\n/usr/local/sbin/siproxd\n");
fclose($fout);
diff --git a/packages/spamd.xml b/packages/spamd.xml
index 625150e3..f34502e7 100644
--- a/packages/spamd.xml
+++ b/packages/spamd.xml
@@ -153,6 +153,7 @@
system("/usr/local/etc/rc.d/spamd 2>/dev/null");
</custom_php_install_command>
<custom_php_deinstall_command>
- system("/bin/rm /usr/local/pkg/spamd* /usr/local/www/spam*");
+ unlink_if_exists("/usr/local/pkg/spamd*");
+ unlink_if_exists("/usr/local/www/spam*");
</custom_php_deinstall_command>
</packagegui>
diff --git a/packages/stunnel.xml b/packages/stunnel.xml
index 253da369..581c5971 100644
--- a/packages/stunnel.xml
+++ b/packages/stunnel.xml
@@ -83,8 +83,8 @@
system("chmod 555 /usr/local/etc/rc.d/stunnel.sh");
</custom_php_install_command>
<custom_php_deinstall_command>
- system("rm -rf /var/tmp/stunnel 2>/dev/null");
- system("rm -rf /usr/local/etc/stunnel*");
+ rmdir_recursive("/var/tmp/stunnel");
+ rmdir_recursive("/usr/local/etc/stunnel*");
</custom_php_deinstall_command>
<custom_add_php_command_late>
conf_mount_rw();