Skip to content
Snippets Groups Projects
Commit f32bc242 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Upgrade of package break install

Conflicts:
	build/rpm/dolibarr_fedora.spec
	build/rpm/dolibarr_generic.spec
parent e8400afe
No related branches found
No related tags found
No related merge requests found
......@@ -302,9 +302,14 @@ echo "-------------------------------------------------------"
echo
#---- postun (after uninstall)
#---- postun (after upgrade or uninstall)
%postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
......@@ -321,16 +326,14 @@ if [ "x$status" = "xpurge" ] ;
then
# Restart web server
echo Restart web server
if [ -f %{_sysconfdir}/init.d/httpd ]; then
%{_sysconfdir}/init.d/httpd restart
fi
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
%{_sysconfdir}/init.d/apache2 restart
/sbin/service httpd restart
fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
%changelog
* Mon Apr 22 2013 Laurent Destailleur 3.3.3-0.3
- Initial version (#723326)
......@@ -478,9 +478,14 @@ echo
#---- postun (after uninstall)
#---- postun (after upgrade or uninstall)
%postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars
os='unknown';
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
......@@ -521,14 +526,21 @@ if [ "x$status" = "xpurge" ] ;
then
# Restart web server
echo Restart web server
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
/sbin/service httpd restart
%else
if [ -f %{_sysconfdir}/init.d/httpd ]; then
%{_sysconfdir}/init.d/httpd restart
fi
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
%{_sysconfdir}/init.d/apache2 restart
fi
%endif
fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
%changelog
......
......@@ -294,9 +294,14 @@ echo "-------------------------------------------------------"
echo
#---- postun (after uninstall)
#---- postun (after upgrade or uninstall)
%postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
......@@ -320,6 +325,10 @@ then
%{_sysconfdir}/init.d/apache2 restart
fi
fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
......
......@@ -300,9 +300,14 @@ echo "-------------------------------------------------------"
echo
#---- postun (after uninstall)
#---- postun (after upgrade or uninstall)
%postun
if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
......@@ -326,7 +331,10 @@ then
%{_sysconfdir}/init.d/apache2 restart
fi
fi
else
# Upgrade
echo "No remove ation done (this is an upgrade)"
fi
%changelog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment