PREIN
/bin/sh
/usr/sbin/groupadd -r asterisk &>/dev/null || :
/usr/sbin/useradd -r -s /sbin/nologin -d /var/lib/asterisk -M \
-c 'Asterisk User' -g asterisk asterisk &>/dev/null || :
PREUN
/bin/sh
if [ "$1" -eq "0" ]; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable asterisk.service > /dev/null 2>&1 || :
/bin/systemctl stop asterisk.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
/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 asterisk.service >/dev/null 2>&1 || :
fi
Triggers
asterisk <
1.8.2.4-2
/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply asterisk
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save asterisk >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del asterisk >/dev/null 2>&1 || :
/bin/systemctl try-restart asterisk.service >/dev/null 2>&1 || :