Sophie

Sophie

distrib > PLD > ra > i686 > media > dist > by-pkgid > e569f868496b0edc38908a38ef5f3dab > scriptlet

boa-0.94.13-1.i686.rpm

PREIN

/bin/sh
if [ -n "`getgid http`" ]; then
        if [ "`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 "Creating group http GID=51"
        /usr/sbin/groupadd -g 51 -r -f http
fi
if [ -n "`id -u http 2>/dev/null`" ]; then
        if [ "`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 "Creating user http UID=51"
        /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
fi

PREUN

/bin/sh
if [ "$1" = "0" ]; then
        if [ -f /var/lock/subsys/boa ]; then
                /etc/rc.d/init.d/boa stop 1>&2
        fi
        /sbin/chkconfig --del boa
fi

POSTIN

/bin/sh
/sbin/chkconfig --add boa
if [ -f /var/lock/subsys/boa ]; then
        /etc/rc.d/init.d/boa restart 1>&2
else
        echo "Run \"/etc/rc.d/init.d/boa start\" to start boa http daemon."
fi

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
	echo "Removing user http UID=51"
	/usr/sbin/userdel http > /dev/null 2>&1
	echo "Removing group http GID=51"
        /usr/sbin/groupdel http > /dev/null 2>&1
fi