post_install() {
    post_upgrade
}

pre_remove() {
    systemctl stop asterisk.service
}


post_upgrade() {
    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
}
