summarylogtreecommitdiffstats
path: root/airvpn-suite-beta-bin.install
diff options
context:
space:
mode:
Diffstat (limited to 'airvpn-suite-beta-bin.install')
-rw-r--r--airvpn-suite-beta-bin.install23
1 files changed, 23 insertions, 0 deletions
diff --git a/airvpn-suite-beta-bin.install b/airvpn-suite-beta-bin.install
new file mode 100644
index 00000000000..fe6a7d9fdf9
--- /dev/null
+++ b/airvpn-suite-beta-bin.install
@@ -0,0 +1,23 @@
+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
+}
+
+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
+}