MON-14383 fix install files and config

This commit is contained in:
Luiz Costa 2022-07-27 15:37:58 +01:00
parent f0c4e040e9
commit c112455712
5 changed files with 24 additions and 14 deletions

View File

@ -1,10 +0,0 @@
#!/bin/sh
if [ "$1" = "configure" ] ; then
systemctl daemon-reload
systemctl enable centreon_vmware.service
systemctl restart centreon_vmware.service
fi
exit 0

View File

@ -1 +0,0 @@
../../../contrib/debian/centreon_vmware-systemd

View File

@ -1 +0,0 @@
../../../contrib/config/centreon_vmware-conf.pm

View File

@ -1,4 +1,4 @@
centreon_vmware.pl usr/bin
debian/contrib/centreon_vmware lib/systemd/system
debian/contrib/centreon_vmware.pm etc/centreon
contrib/debian/centreon_vmware-systemd lib/systemd/system
contrib/config/centreon_vmware-conf.pm etc/centreon
centreon/* usr/share/perl5/centreon

View File

@ -0,0 +1,22 @@
#!/bin/sh
if [ "$1" = "configure" ] ; then
if [ -e "/lib/systemd/system/centreon_vmware-systemd" ]; then
mv /lib/systemd/system/centreon_vmware-systemd /lib/systemd/system/centreon_vmware.service
fi
if [ -e "/etc/centreon/centreon_vmware-conf.pm" ]; then
mv /etc/centreon/centreon_vmware-conf.pm /etc/centreon/centreon_vmware.pm
fi
if [ "$(getent passwd centreon)" ]; then
chown centreon:centreon /etc/centreon/centreon_vmware.pm
fi
systemctl daemon-reload
systemctl enable centreon_vmware.service
systemctl restart centreon_vmware.service
fi
exit 0