Sophie

Sophie

distrib > Mageia > 8 > i586 > media > core-release > by-pkgid > e85dccb7915506707e6314e44336b88b > scriptlet

tclhttpd-3.5.1-7.mga8.i586.rpm

PREIN

/bin/sh
# The "tclhttpd" user is used so that we don't have to run the
# server as "root" or "nobody".
user_uid=`id -u tclhttpd 2>/dev/null`
if [ x"$user_uid" = x ] ; then
    useradd -r -s /sbin/nologin -d /var/www/tclhttpd -M \
            -c 'Tclhttpd' \
            tclhttpd >/dev/null || :
fi

PREUN

/bin/sh
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable tclhttpd.service > /dev/null 2>&1 || :
    /bin/systemctl stop tclhttpd.service > /dev/null 2>&1 || :
fi

POSTIN

/bin/sh
if [ $1 -eq 1 ] ; then 
    # Initial installation 
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

POSTUN

/bin/sh
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
    # Package upgrade, not uninstall
    /bin/systemctl try-restart tclhttpd.service >/dev/null 2>&1 || :
fi

Triggers

tclhttpd < 3.5.1-23

/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply tclhttpd
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save tclhttpd >/dev/null 2>&1 ||:

# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del tclhttpd >/dev/null 2>&1 || :
/bin/systemctl try-restart tclhttpd.service >/dev/null 2>&1 || :