aboutsummaryrefslogtreecommitdiffstats
path: root/config/syslog-ng
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-02-09 15:50:43 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-02-09 15:58:51 -0200
commit400b33df4bdc848a0f620203289d599f6f88dbf7 (patch)
tree733873421e7ab6c469d8ec5054d536de8196c06a /config/syslog-ng
parent8d9385db622301172a7d49553b0e9f8b80115950 (diff)
downloadpfsense-packages-400b33df4bdc848a0f620203289d599f6f88dbf7.tar.gz
pfsense-packages-400b33df4bdc848a0f620203289d599f6f88dbf7.tar.bz2
pfsense-packages-400b33df4bdc848a0f620203289d599f6f88dbf7.zip
Make sure symlink is removed before attempt to recreate it
Diffstat (limited to 'config/syslog-ng')
-rw-r--r--config/syslog-ng/syslog-ng.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/syslog-ng/syslog-ng.inc b/config/syslog-ng/syslog-ng.inc
index c87df60a..818ae123 100644
--- a/config/syslog-ng/syslog-ng.inc
+++ b/config/syslog-ng/syslog-ng.inc
@@ -37,8 +37,7 @@ require_once('service-utils.inc');
if(!function_exists("filter_configure"))
require_once("filter.inc");
-if (!defined("SYSLOGNG_BSEDIR"))
- define("SYSLOGNG_BASEDIR", "/usr/pbi/syslog-ng-" . php_uname("m") . "/");
+define("SYSLOGNG_BASEDIR", "/usr/pbi/syslog-ng-" . php_uname("m") . "/");
function syslogng_get_real_interface_address($interface) {
$interface = convert_friendly_interface_to_real_interface_name($interface);
@@ -50,6 +49,8 @@ function syslogng_get_real_interface_address($interface) {
function syslogng_install_command() {
conf_mount_rw();
+ if (is_link("/usr/local/lib/syslog-ng"))
+ unlink_if_exists("/usr/local/lib/syslog-ng");
if (!file_exists("/usr/local/lib/syslog-ng"))
@symlink(SYSLOGNG_BASEDIR . "local/lib/syslog-ng", "/usr/local/lib/syslog-ng");
syslogng_install_cron(true);