diff options
author | Marcello Coutinho <marcellocoutinho@gmail.com> | 2012-05-10 15:42:42 -0300 |
---|---|---|
committer | marcelloc <marcellocoutinho@gmail.com> | 2012-05-10 15:42:42 -0300 |
commit | 026fdf7b9de180f2d92b5796421848e82be6e5f4 (patch) | |
tree | 871651a3618237d3e48846d42c94658266e9bafe /config/imspector-dev/imspector.inc | |
parent | 0293a8f6b843135a3b97917e09a1de5314bdd721 (diff) | |
download | pfsense-packages-026fdf7b9de180f2d92b5796421848e82be6e5f4.tar.gz pfsense-packages-026fdf7b9de180f2d92b5796421848e82be6e5f4.tar.bz2 pfsense-packages-026fdf7b9de180f2d92b5796421848e82be6e5f4.zip |
imspector-dev - fix report template bugs and missing file
Diffstat (limited to 'config/imspector-dev/imspector.inc')
-rw-r--r-- | config/imspector-dev/imspector.inc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/config/imspector-dev/imspector.inc b/config/imspector-dev/imspector.inc index a4af7771..52c7ae1b 100644 --- a/config/imspector-dev/imspector.inc +++ b/config/imspector-dev/imspector.inc @@ -101,11 +101,12 @@ function deinstall_package_imspector() { imspector_action('stop'); - @unlink(IMSPECTOR_RCFILE); - @unlink(IMSPECTOR_CONFIG); - @unlink(IMSPECTOR_ETC . '/badwords_custom.txt'); - @unlink(IMSPECTOR_ETC . '/acl_blacklist.txt'); - @unlink(IMSPECTOR_ETC . '/acl_whitelist.txt'); + unlink_if_exists(IMSPECTOR_RCFILE); + unlink_if_exists(IMSPECTOR_CONFIG); + unlink_if_exists(IMSPECTOR_ETC . '/badwords_custom.txt'); + unlink_if_exists(IMSPECTOR_ETC . '/acl_blacklist.txt'); + unlink_if_exists(IMSPECTOR_ETC . '/acl_whitelist.txt'); + unlink_if_exists('/usr/local/www/imspector_logs.php'); //exec('pkg_delete imspector-0.4'); } @@ -346,10 +347,11 @@ $template="services_imspector_logs.php"; else $template=$ims_config['template']; - - if (file_exists("/usr/local/www/{$template}")) - $log_file=file_get_contents("/usr/local/www/{$template}"); - file_put_contents("/usr/local/www/imspector_logs.php",$log_file,LOCK_EX); + + /*link template file*/ + $link="/usr/local/www/imspector_logs.php"; + unlink_if_exists($link); + symlink("/usr/local/www/{$template}", $link); /* generate rc file start and stop */ $stop = <<<EOD |