Post Uninstall hooks for fedora based OS's

Previously the `postun` hook would try and remove ProxySQL from
chkconfig, but that would fail because the package was already
uninstalled.

Instead, we can do this in the `preun` hook, and ensure that ProxySQL
is properly shutdown before doing cleanup tasks.
pull/910/head
Christopher Troup 9 years ago
parent c1dfa0eb77
commit 83ca1944f0

@ -39,9 +39,12 @@ rm -rf %{buildroot}
mkdir /var/run/%{name}
chkconfig --add %{name}
%preun
/etc/init.d/%{name} stop
chkconfig --del %{name}
%postun
rm -rf /var/run/%{name}
chkconfig --del %{name}
%files
%defattr(-,root,root,-)

@ -39,9 +39,12 @@ rm -rf %{buildroot}
mkdir /var/run/%{name}
chkconfig --add %{name}
%preun
/etc/init.d/%{name} stop
chkconfig --del %{name}
%postun
rm -rf /var/run/%{name}
chkconfig --del %{name}
%files
%defattr(-,root,root,-)

@ -39,9 +39,12 @@ rm -rf %{buildroot}
mkdir /var/run/%{name}
chkconfig --add %{name}
%preun
/etc/init.d/%{name} stop
chkconfig --del %{name}
%postun
rm -rf /var/run/%{name}
chkconfig --del %{name}
%files
%defattr(-,root,root,-)

@ -39,9 +39,12 @@ rm -rf %{buildroot}
mkdir /var/run/%{name}
chkconfig --add %{name}
%preun
/etc/init.d/%{name} stop
chkconfig --del %{name}
%postun
rm -rf /var/run/%{name}
chkconfig --del %{name}
%files
%defattr(-,root,root,-)

Loading…
Cancel
Save