diff --git a/fluent-package/templates/package-scripts/fluent-package/deb/prerm b/fluent-package/templates/package-scripts/fluent-package/deb/prerm index 37b6d9c4..83004fdd 100755 --- a/fluent-package/templates/package-scripts/fluent-package/deb/prerm +++ b/fluent-package/templates/package-scripts/fluent-package/deb/prerm @@ -33,18 +33,6 @@ esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. -. /etc/default/<%= service_name %> -if [ "$FLUENT_PACKAGE_SERVICE_RESTART" = "manual" ]; then - # Do not stop service because removing package will be executed - # for major downgrade (e.g. uninstall v6 then reinstall v5) - # In such a case, missing plugins for v5 cause trouble in - # restarting service. - # so instead of restarting service here, demand users to install - # such plugins in advance then delegate users to restart service - # manually later. - : -else - #DEBHELPER# -fi +#DEBHELPER# exit 0 diff --git a/fluent-package/yum/fluent-package.spec.in b/fluent-package/yum/fluent-package.spec.in index 590dbb7d..ec5f56c2 100644 --- a/fluent-package/yum/fluent-package.spec.in +++ b/fluent-package/yum/fluent-package.spec.in @@ -197,18 +197,7 @@ if [ $1 -eq 2 ]; then fi %preun -. %{_sysconfdir}/sysconfig/@SERVICE_NAME@ -echo "preun FLUENT_PACKAGE_SERVICE_RESTART: $FLUENT_PACKAGE_SERVICE_RESTART" -if [ $1 -eq 0 ]; then - if [ "$FLUENT_PACKAGE_SERVICE_RESTART" = "manual" ]; then - # When rollback to previous version, there is a case that user want to - # restart manually to reduce downtime. - : - else - # disable service here - %systemd_preun @SERVICE_NAME@.service - fi -fi +%systemd_preun @SERVICE_NAME@.service %post . %{_sysconfdir}/sysconfig/@SERVICE_NAME@