diff options
author | Ermal <eri@pfsense.org> | 2012-07-14 22:16:23 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-07-14 22:16:23 +0000 |
commit | 13a64eb7c28aa216b5b3bb07a3c5113cf8e79f88 (patch) | |
tree | b27915595939e07484e8edd98a1d5d7611dc2fd9 /config/snort | |
parent | 0c35070682b3a58e1c3b8b40bc1512bc72bb7676 (diff) | |
download | pfsense-packages-13a64eb7c28aa216b5b3bb07a3c5113cf8e79f88.tar.gz pfsense-packages-13a64eb7c28aa216b5b3bb07a3c5113cf8e79f88.tar.bz2 pfsense-packages-13a64eb7c28aa216b5b3bb07a3c5113cf8e79f88.zip |
Always forget unlink does not remove dirs
Diffstat (limited to 'config/snort')
-rw-r--r-- | config/snort/snort_check_for_rule_updates.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index 23cdc9a7..f6299faa 100644 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -183,7 +183,7 @@ if ($snortdownload == 'on') { $newfile = basename($file); @copy($file, "{$snortdir}/rules/snort_{$newfile}"); } - @unlink("{$snortdir}/snortrules"); + exec("rm -r {$snortdir}/snortrules"); /* extract so rules */ exec('/bin/mkdir -p /usr/local/lib/snort/dynamicrules/'); @@ -197,7 +197,7 @@ if ($snortdownload == 'on') { exec("/bin/cp {$snortdir}/tmp/so_rules/precompiled/$freebsd_version_so/x86-64/{$snort_version}/* /usr/local/lib/snort/dynamicrules/"); } else $nosorules = true; - @unlink("{$snortdir}/tmp/so_rules"); + exec("rm -r {$snortdir}/tmp/so_rules"); if ($nosorules == false) { /* extract so rules none bin and rename */ @@ -207,7 +207,7 @@ if ($snortdownload == 'on') { $newfile = basename($file, ".rules"); @copy($file, "{$snortdir}/rules/snort_{$newfile}.so.rules"); } - @unlink("{$snortdir}/tmp/so_rules"); + exec("rm -r {$snortdir}/tmp/so_rules"); /* extract base etc files */ exec("/usr/bin/tar xzf {$tmpfname}/{$snort_filename} -C {$snortdir}/tmp etc/"); @@ -215,7 +215,7 @@ if ($snortdownload == 'on') { if (file_exists("{$snortdir}/tmp/etc/{$file}")) @copy("{$snortdir}/tmp/etc/{$file}", "{$snortdir}/{$file}"); } - @unlink("{$snortdir}/tmp/etc"); + exec("rm -r {$snortdir}/tmp/etc"); /* Untar snort signatures */ $signature_info_chk = $config['installedpackages']['snortglobal']['signatureinfo']; |