Author Name: ccesario - (ccesario -)
Original Redmine Issue: 5, https://forge.centreon.com/issues/5
Original Assignee: Guillaume Watteeux
In my installation of centreon 2-beta1 I wat having this problem in [[CentWeb]] installation
sed: -e expression #17, character 31: unterminated @s’ command
with help of watt I debug the install and see that variable $NAGIOS_P1_FILE is “stranger”
in [[CentWeb]].shI put..
echo “VAR VALUE = \”$NAGIOS_P1_FILE\""
see the results
VAR VALUE = “/opt/nagios/bin/p1.pl
/opt/nagios/bin/p1.pl”
the var is duplicated and with “\n”
1. grep -r “^p1_file” /opt/nagios/etc/ | cut -d= -f2
/opt/nagios/bin/p1.pl
/opt/nagios/bin/p1.pl
found 2 values, because…
1. grep -r “^p1_file” /opt/nagios/etc/
/opt/nagios/etc/sample/nagios.cfg-sample:p1_file=/opt/nagios/bin/p1.pl
/opt/nagios/etc/nagios.cfg:p1_file=/opt/nagios/bin/p1.pl
Because I have the sample files in /opt/nagios/etc/
my solution to “fix” temporary this :
in libinstall/functions file
function locate_nagios_p1_file()
I replace
NAGIOS_P1_FILE=$(grep -r “^p1_file” $nagios_etc | cut -d= -f2)
to
NAGIOS_P1_FILE=$(grep -r “^p1_file” $nagios_etc | grep -v -i “sample” | cut -d= -f2 | uniq)
:)
sorry my english eheheh
Carlos