diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-21 04:32:13 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-21 04:32:13 +0000 |
commit | c34fb5342a439e59323e34185727f182e52801e2 (patch) | |
tree | 3484cd4248a3e8a09a325892254e290a0e7dbef7 /packages/pure-ftpd.xml | |
parent | 1edd830d8e1dcf41b9f9426e27c387c7b0616f22 (diff) | |
download | pfsense-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/pure-ftpd.xml')
-rw-r--r-- | packages/pure-ftpd.xml | 9 |
1 files changed, 4 insertions, 5 deletions
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> |