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, 15 insertions, 0 deletions
diff --git a/pcr/asterisk/asterisk.install b/pcr/asterisk/asterisk.install
new file mode 100644
index 000000000..b7c1a71f7
--- /dev/null
+++ b/pcr/asterisk/asterisk.install
@@ -0,0 +1,15 @@
+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_remove() {
+ userdel asterisk &>/dev/null
+ groupdel asterisk &>/dev/null
+}