diff options
Diffstat (limited to 'pcr/asterisk/asterisk.install')
-rw-r--r-- | pcr/asterisk/asterisk.install | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/pcr/asterisk/asterisk.install b/pcr/asterisk/asterisk.install index 84cc01d87..4c342129e 100644 --- a/pcr/asterisk/asterisk.install +++ b/pcr/asterisk/asterisk.install @@ -1,20 +1,18 @@ post_install() { - groupadd -r asterisk - useradd -MNr -s /bin/false -d /run/asterisk -g asterisk asterisk && passwd -l asterisk &>/dev/null - - post_upgrade + post_upgrade } -post_remove() { - killall -q asterisk - userdel asterisk &>/dev/null - groupdel asterisk &>/dev/null +pre_remove() { + systemctl stop asterisk.service } + post_upgrade() { - chown -R asterisk:asterisk /etc/asterisk - chown -R asterisk:asterisk /var/lib/asterisk - chown -R asterisk:asterisk /var/log/asterisk - chown -R asterisk:asterisk /run/asterisk - chown -R asterisk:asterisk /var/spool/asterisk + systemd-sysusers + + chown -R asterisk:asterisk /etc/asterisk + chown -R asterisk:asterisk /var/lib/asterisk + chown -R asterisk:asterisk /var/log/asterisk + chown -R asterisk:asterisk /run/asterisk + chown -R asterisk:asterisk /var/spool/asterisk } |