+ Add sysconfig file

git-svn-id: http://svn.merethis.net/centreon-esxd/trunk@69 a5eaa968-4c79-4d68-970d-af6011b5b055
This commit is contained in:
Quentin Garnier 2013-09-09 13:40:54 +00:00
parent bd095d1633
commit 6410eb0429
3 changed files with 7 additions and 4 deletions

View File

@ -13,12 +13,14 @@
binary=/usr/bin/centreon_esxd
servicename=$(basename "$0")
options=""
OPTIONS=""
user=root
timeout=60
pidfile=/var/run/centreon_esxd.pid
[ -e /etc/sysconfig/$servicename ] && . /etc/sysconfig/$servicename
# Check if we can find the binary.
if [ ! -x $binary ]; then
echo -n $"Starting $servicename.";
@ -46,9 +48,9 @@ start() {
fi
if [ "$(id -u -n)" = "$user" ] ; then
daemon ''$binary' '$options' > /dev/null 2>&1 &'
daemon ''$binary' '$OPTIONS' > /dev/null 2>&1 &'
else
daemon --user $user ''$binary' '$options' > /dev/null 2>&1 &'
daemon --user $user ''$binary' '$OPTIONS' > /dev/null 2>&1 &'
fi
pid=$(pidofproc $binary)
RETVAL=$?

View File

@ -0,0 +1,2 @@
# centreon_esxd command line options
OPTIONS="--logfile=/var/log/centreon/centreon_esxd.log --severity=error"

View File

@ -181,7 +181,6 @@ sub generic_performance_values_historic {
my $endTime = sprintf("%04d-%02d-%02dT%02d:%02d:%02dZ",
(1900+$t[5]),(1+$t[4]),$t[3],$t[2],$t[1],$t[0]);
# $obj_esxd->{logger}->writeLogError(@perf_metric_ids);
if ($interval == 20) {
$perf_query_spec = PerfQuerySpec->new(entity => $view,
metricId => $perf_metric_ids,