summarylogtreecommitdiffstats
path: root/airvpn-suite-beta-bin.install
blob: 00ccb86affdc653349545cd8f5f79a2409d73c78 (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
post_install() {
    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
}