diff options
Diffstat (limited to 'airvpn-suite.install')
-rw-r--r-- | airvpn-suite.install | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/airvpn-suite.install b/airvpn-suite.install new file mode 100644 index 000000000000..cb5b10562ee6 --- /dev/null +++ b/airvpn-suite.install @@ -0,0 +1,39 @@ +post_install() { + getent passwd airvpn >/dev/null + if [ $? -eq '2' ]; then + useradd -Um airvpn + fi + chown -R airvpn:airvpn /etc/airvpn + + echo "#########################################################" + echo "If you want to be able to execute goldcrest as your user," + echo "add yourself to the airvpn group, like this:" + echo "sudo usermod -aG airvpn <username>" + echo "#########################################################" + + # workaround for ExecStart path hardcoded in unit file + # ln -s /usr/bin/bluetit /sbin/bluetit + + systemctl daemon-reload + systemctl enable bluetit.service + systemctl start bluetit.service +} + +pre_upgrade() { + systemctl stop bluetit.service +} + +post_upgrade() { + systemctl start 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 + # rm /sbin/bluetit +} |