blob: c51ed5e1322fffea436d436a38bee7f5ed6e9d8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
|