Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 824a50936628b8b9321368607f60e30f > scriptlet

luci-0.24.0-2.fc14.i686.rpm

PREIN

/bin/sh
getent group luci >/dev/null || groupadd -r luci
getent passwd luci >/dev/null || \
    useradd -r -g luci -d /var/lib/luci -s /sbin/nologin \
    -c "luci high availability management application" luci

if [ "$1" -eq "2" ]; then
# If we're upgrading from luci 0.22.x, we need to move
# the old config out of the way, as this file is no longer
# marked %config, but %ghost in luci 0.23.0 and later
    conf_first_word="$((head -1 /var/lib/luci/etc/luci.ini 2>/dev/null || echo 'empty')|awk '{print $2}')"
    if [ "$conf_first_word" = "luci" ]; then
        mv -f /var/lib/luci/etc/luci.ini /var/lib/luci/etc/luci.ini.rpmsave
    fi
fi
exit 0

PREUN

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

POSTIN

/bin/sh
/sbin/chkconfig --add "luci" || :

POSTUN

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