summarylogtreecommitdiffstats
path: root/airvpn-suite-beta-bin.install
blob: 23574de5db15a50c35828993e2063497e7f60a1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
post_install() {
	getent passwd airvpn >/dev/null
    if [ $? -eq '2' ]; then
        useradd -Um airvpn
    fi
    chown -R airvpn:airvpn /etc/airvpn
    systemctl daemon-reload
}

pre_upgrade() {
    systemctl stop bluetit.service
}

post_upgrade() {
    chown -R airvpn:airvpn /etc/airvpn
}

pre_remove() {
    systemctl stop bluetit.service
    systemctl disable bluetit.service
}

post_remove() {
    userdel -r airvpn 2>/dev/null
    getent group airvpn >/dev/null && gpasswd airvpn -M "" && groupdel airvpn
    systemctl daemon-reload
}