summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArda Aytekin2021-03-02 08:53:02 +0100
committerArda Aytekin2021-03-02 08:53:02 +0100
commit47df80492ff3f6b05bfb9daad4cd26eeafb164ec (patch)
tree2a65fe2b56afa62f684e6e5bc8c6d1bee457bccc
parentd7e3d3102c9c71ab5b82d9b3d99026f45b499954 (diff)
downloadaur-47df80492ff3f6b05bfb9daad4cd26eeafb164ec.tar.gz
Auto-manage vpn-unlimited-daemon.service
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD4
-rw-r--r--vpn-unlimited.install23
3 files changed, 28 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b4f126d17a4e..dce1ba1900dd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = vpn-unlimited
pkgdesc = VPN Unlimited client application
pkgver = 8.5
- pkgrel = 2
+ pkgrel = 3
url = https://www.vpnunlimitedapp.com
+ install = vpn-unlimited.install
arch = x86_64
license = custom:"Copyright (c) 2018 KeepSolid Inc."
depends = glibc>=2.9
diff --git a/PKGBUILD b/PKGBUILD
index b037545b8e71..4b3bef06aeaf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=vpn-unlimited
pkgver=8.5
-pkgrel=2
+pkgrel=3
pkgdesc="VPN Unlimited client application"
arch=("x86_64")
url="https://www.vpnunlimitedapp.com"
@@ -55,3 +55,5 @@ package() {
find "${pkgdir}/usr/share" -type d -name aclocal -prune -exec rm -rf {} +
find "${pkgdir}/usr/lib" -type f -name "*.so*" -exec chmod +x {} +
}
+
+install=vpn-unlimited.install
diff --git a/vpn-unlimited.install b/vpn-unlimited.install
new file mode 100644
index 000000000000..4467f9fc271d
--- /dev/null
+++ b/vpn-unlimited.install
@@ -0,0 +1,23 @@
+post_install() {
+ echo "Enabling and starting vpn-unlimited-daemon.service ..."
+ systemctl daemon-reload
+ systemctl enable vpn-unlimited-daemon.service
+ systemctl start vpn-unlimited-daemon.service
+}
+
+post_upgrade() {
+ echo "Restarting vpn-unlimited-daemon.service ..."
+ systemctl daemon-reload
+ systemctl restart vpn-unlimited-daemon.service
+}
+
+pre_remove() {
+ echo "Stopping and disabling vpn-unlimited-daemon.service ..."
+ systemctl stop vpn-unlimited-daemon.service
+ systemctl disable vpn-unlimited-daemon.service
+}
+
+post_remove() {
+ echo "Running systemctl daemon-reload ..."
+ systemctl daemon-reload
+}