PREIN
/bin/sh
if [ -n "`/usr/bin/getgid http`" ]; then
if [ "`/usr/bin/getgid http`" != "51" ]; then
echo "Error: group http doesn't have gid=51. Correct this before installing boa." 1>&2
exit 1
fi
else
echo "Adding group http GID=51."
/usr/sbin/groupadd -g 51 -r http 1>&2 || exit $?
[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || :
fi;
if [ -n "`/bin/id -u http 2>/dev/null`" ]; then
if [ "`/bin/id -u http`" != "51" ]; then
echo "Error: user http doesn't have uid=51. Correct this before installing boa." 1>&2
exit 1
fi
else
echo "Adding user http UID=51."
/usr/sbin/useradd \
\
-u 51 \
-r \
-d /usr/share/empty \
-s /bin/false \
-c "HTTP User"\
-g http \
\
\
http 1>&2 || exit $?
[ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || :
fi;
PREUN
/bin/sh
if [ "$1" = "0" ]; then
{
if [ -f /var/lock/subsys/boa ]; then
/sbin/service boa stop 1>&2 || :;
fi }; /sbin/chkconfig --del boa
fi
POSTIN
/bin/sh
/sbin/chkconfig --add boa
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/boa ] && . /etc/sysconfig/boa
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/boa ]; then
/sbin/service boa restart 1>&2 || :;
else
echo 'Run "/sbin/service boa start" to start boa HTTP daemon.'
fi
fi };
POSTUN
/bin/sh
if [ "$1" = "0" ]; then
/usr/lib/rpm/user_group.sh user del http
/usr/lib/rpm/user_group.sh group del http
fi
Triggers
boa <
0.94.14-0.rc20.0
/bin/sh
if [ -f /etc/httpd/boa.conf.rpmsave ]; then
echo "warning: installing /etc/boa.conf as /etc/boa.conf.rpmnew"
mv /etc/boa.conf /etc/boa.conf.rpmnew
echo "warning: moving /etc/httpd/boa.conf.rpmsave to /etc/boa.conf"
mv /etc/httpd/boa.conf.rpmsave /etc/boa.conf
fi