diff options
Diffstat (limited to 'trunk/del-webapp')
-rwxr-xr-x | trunk/del-webapp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/trunk/del-webapp b/trunk/del-webapp new file mode 100755 index 0000000..ec407a8 --- /dev/null +++ b/trunk/del-webapp @@ -0,0 +1,23 @@ +#!/bin/sh + +if [ $# != 2 ]; then + echo "usage: $0 <pkg name> <number installed>" 1>&2 + exit 1 +fi + +pkg=$1 # name of the package +num=$2 # number of packages installed + +if [ $num = 0 ]; then + # 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 + fi +else + # update: just reload web server if running, + # as the number of configuration files didn't change + /sbin/service httpd condreload +fi |