Sophie

Sophie

distrib > Fedora > 19 > i386 > by-pkgid > 608d525e8004f651b0ad27662489f2d5 > scriptlet

orthanc-0.8.5-1.fc19.i686.rpm

PREIN

/bin/sh
# http://fedoraproject.org/wiki/Packaging%3aUsersAndGroups
# "We never remove users or groups created by packages"

getent group orthanc >/dev/null || groupadd -r orthanc
getent passwd orthanc >/dev/null || \
    useradd -r -g orthanc -G orthanc -d /var/lib/orthanc -s /sbin/nologin \
    -c "User account that holds information for Orthanc" orthanc
exit 0

PREUN

/bin/sh

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

POSTIN

/bin/sh

if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset orthanc.service >/dev/null 2>&1 || : 
fi

POSTUN

/bin/sh

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