Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 81e360cf0d1d39b2f9cc53f21854cdd1 > scriptlet

openvpn-2.3.2-4.fc18.i686.rpm

PREIN

/bin/sh
getent group openvpn &>/dev/null || groupadd -r openvpn
getent passwd openvpn &>/dev/null || \
    /usr/sbin/useradd -r -g openvpn -s /sbin/nologin -c OpenVPN \
        -d /etc/openvpn openvpn

PREUN

/bin/sh
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable openvpn.service > /dev/null 2>&1 || :
    /bin/systemctl stop openvpn.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 || :
# Normally, we'd try a restart here, but in this case, it could be troublesome.

Triggers

openvpn < 2.2.1-2

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

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