summarylogtreecommitdiffstats
path: root/airvpn-suite.install
blob: 33636063b927093eeeb01d778490a40a641100b4 (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
28
29
30
31
32
33
34
35
36
37
38
post_install() {
	getent passwd airvpn >/dev/null
    if [ $? -eq '2' ]; then
        useradd -Um airvpn
    fi
    chown -R airvpn:airvpn /etc/airvpn
    echo "############################################################"
    echo "#                >>> Group airvpn created <<<              #"
    echo "# If you want to be able to execute goldcrest as your user #"
    echo "# add it to the created group using:                       #"
    echo "#                                                          #"
    echo "# sudo usermod -aG airvpn <username>                       #"
    echo "############################################################"
    systemctl daemon-reload
    systemctl reload dbus.service
}

pre_upgrade() {
    systemctl stop bluetit.service
}

post_upgrade() {
    chown -R airvpn:airvpn /etc/airvpn
    systemctl daemon-reload
    systemctl reload dbus.service
}

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
    systemctl reload dbus.service
}