From 2e4321a18b751cf9e533a34163e14e93d05de4d3 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Thu, 31 Aug 2006 11:38:41 +0000 Subject: test httpd service presence before using it, in case of simultaneous removal scenario (see bug #24188) --- del-webapp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'del-webapp') diff --git a/del-webapp b/del-webapp index 95a4eef..110c00a 100755 --- a/del-webapp +++ b/del-webapp @@ -9,9 +9,13 @@ pkg=$1 # name of the package num=$2 # number of packages installed if [ $num = 0 ]; then - # uninstallation: restart web server if running, - # a there is one less configuration file - /sbin/service httpd condrestart + # in simultaneous removal scenario, web server may + # already have been removed + if [ -f /etc/init.d/httpd ]; then + # uninstallation: restart web server if running, + # a there is one less configuration file + /sbin/service httpd condrestart + ] else # update: just reload web server if running, # as the number of configuration files didn't change -- cgit v1.2.1