aboutsummaryrefslogtreecommitdiffstats
path: root/config/imspector-dev/imspector.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/imspector-dev/imspector.inc')
-rw-r--r--config/imspector-dev/imspector.inc20
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