Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 8f97083568f8782af35dd9cd737a2112 > scriptlet

cyphesis-0.5.24-1.fc14.1.i686.rpm

PREIN

/bin/sh
getent group cyphesis >/dev/null || groupadd -r cyphesis
getent passwd cyphesis >/dev/null || \
       useradd -r -g cyphesis -d /usr/share/cyphesis \
       -c "Cyphesis game server" cyphesis
cyphesis_shell=`getent passwd cyphesis | cut -d: -f 7`
if [ "$cyphesis_shell" == "/sbin/nologin" ] ; then
    chsh cyphesis -s /bin/bash
fi
exit 0

PREUN

/bin/sh
if [ "$1" = "0" ]; then
    /sbin/service cyphesis stop > /dev/null 2>&1
    /sbin/chkconfig --del cyphesis
fi

POSTIN

/bin/sh
/sbin/chkconfig --add cyphesis
# Make sure any new game rules are loaded into the database after
# an install or upgrade.
if ! grep -q LOAD_RULES /etc/cyphesis ; then
    sed -i -e 's/LOAD_RULES=.*/LOAD_RULES=1/' /etc/sysconfig/cyphesis 
else
    echo "LOAD_RULES=1" >> /etc/sysconfig/cyphesis
fi

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
    /sbin/service cyphesis condrestart >/dev/null 2>&1
fi