summaryrefslogtreecommitdiff
path: root/pcr/asterisk/asterisk.install
blob: 84cc01d873447e6c3f949293ffa603bb3eaadee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
post_install() {
	groupadd -r asterisk
	useradd -MNr -s /bin/false -d /run/asterisk -g asterisk asterisk && passwd -l asterisk &>/dev/null

	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
}