summaryrefslogtreecommitdiff
path: root/pcr/asterisk/asterisk.install
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/asterisk/asterisk.install')
-rw-r--r--pcr/asterisk/asterisk.install15
1 files changed, 10 insertions, 5 deletions
diff --git a/pcr/asterisk/asterisk.install b/pcr/asterisk/asterisk.install
index b7c1a71f7..84cc01d87 100644
--- a/pcr/asterisk/asterisk.install
+++ b/pcr/asterisk/asterisk.install
@@ -2,14 +2,19 @@ post_install() {
groupadd -r asterisk
useradd -MNr -s /bin/false -d /run/asterisk -g asterisk asterisk && passwd -l asterisk &>/dev/null
- 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
+ post_upgrade
}
post_remove() {
+ killall -q asterisk
userdel asterisk &>/dev/null
groupdel asterisk &>/dev/null
}
+
+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
+}