packaging: remove deprecated tomcat based sysconfig file for centos (#2538)

Remove deprecated tomcat configuration file instead of moving it, since moving it prevented the 4.11 upgrade from overwriting it with the new jetty configurations. Also added systemctl daemon-reload to refresh daemon services so that management server can start up seamlessly after the upgrade.

Fixes #2537
This commit is contained in:
ernjvr 2018-04-09 21:01:09 +02:00 committed by Rohit Yadav
parent 2756d41039
commit bb09caf8dc
2 changed files with 7 additions and 1 deletions

View File

@ -454,6 +454,10 @@ if [ -f "%{_sysconfdir}/cloud.rpmsave/management/db.properties" ]; then
mv %{_sysconfdir}/cloud.rpmsave/management/db.properties %{_sysconfdir}/cloud.rpmsave/management/db.properties.rpmsave
fi
if [ -f %{_sysconfdir}/sysconfig/%{name}-management ] ; then
rm -f %{_sysconfdir}/sysconfig/%{name}-management
fi
chown -R cloud:cloud /var/log/cloudstack/management
%preun agent

View File

@ -398,11 +398,13 @@ if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util
fi
if [ -f %{_sysconfdir}/sysconfig/%{name}-management ] ; then
mv %{_sysconfdir}/sysconfig/%{name}-management %{_sysconfdir}/default/%{name}-management
rm -f %{_sysconfdir}/sysconfig/%{name}-management
fi
chown -R cloud:cloud /var/log/cloudstack/management
systemctl daemon-reload
%preun agent
/sbin/service cloudstack-agent stop || true
if [ "$1" == "0" ] ; then