From 23bc212ff72f478ab7ca909333fb7a0a75a176e1 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 11 Dec 2015 15:09:57 +0100 Subject: Don't create a symlink when it already exists --- config/sarg/sarg.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/sarg/sarg.inc b/config/sarg/sarg.inc index 22e70c95..253dab9d 100644 --- a/config/sarg/sarg.inc +++ b/config/sarg/sarg.inc @@ -94,7 +94,9 @@ function sarg_check_dirs() { if (is_dir($pbidir) && !is_link($pbidir)) { rmdir_recursive($pbidir); } - symlink("/usr/local/sarg-reports", "{$pbidir}"); + if (!is_link($pbidir)) { + symlink("/usr/local/sarg-reports", "{$pbidir}"); + } } // images -- cgit v1.2.3