add systemd configuration option

open PR: https://github.com/eventure/hide.client.linux/pull/10
This commit is contained in:
Leonard König
2021-04-13 19:27:10 +02:00
parent c18fe99f52
commit 64d80f1e8c
4 changed files with 44 additions and 6 deletions

View File

@@ -1,18 +1,20 @@
pkgbase = hide-client
pkgdesc = Hide.me CLI VPN client for Linux
pkgver = 0.9.1
pkgrel = 2
pkgrel = 3
url = hide.me
arch = any
license = GPL2
source = https://github.com/eventure/hide.client.linux/archive/0.9.1.zip
source = go-sum.patch
source = config_sysdirs.patch
source = systemd-config.patch
source = service_sysdirs.patch
md5sums = 9346e79e8e1c98b5457a03e02febca9c
md5sums = 3cca85f964053529bc7d6581ceb3abd7
md5sums = 07d59ac194c4aa8ee0de284283796461
md5sums = 2b70f56ac58d8ba3e496bab23b8beb07
md5sums = 58efe83f8a4d181a788da86c24338b42
md5sums = c19e92d773d241330b01fd83297cc94e
pkgname = hide-client

View File

@@ -2,7 +2,7 @@
pkgname=hide-client
_pkgname=hide.client.linux
pkgver=0.9.1
pkgrel=2
pkgrel=3
epoch=
pkgdesc="Hide.me CLI VPN client for Linux"
arch=('any')
@@ -25,16 +25,19 @@ changelog=
source=("https://github.com/eventure/$_pkgname/archive/$pkgver.zip"
"go-sum.patch"
"config_sysdirs.patch"
"systemd-config.patch"
"service_sysdirs.patch")
noextract=()
md5sums=('9346e79e8e1c98b5457a03e02febca9c'
'3cca85f964053529bc7d6581ceb3abd7'
'07d59ac194c4aa8ee0de284283796461'
'2b70f56ac58d8ba3e496bab23b8beb07')
'58efe83f8a4d181a788da86c24338b42'
'c19e92d773d241330b01fd83297cc94e')
validpgpkeys=()
prepare() {
cd "$_pkgname-$pkgver"
patch -p1 -i "$srcdir/systemd-config.patch"
patch -p1 -i "$srcdir/config_sysdirs.patch"
patch -p1 -i "$srcdir/service_sysdirs.patch"
patch -p1 -i "$srcdir/go-sum.patch"
@@ -63,5 +66,6 @@ package() {
install -Dm644 -t "$pkgdir"/usr/share/hide.me/ CA.pem
# For (system-wide) accessToken.txt
install -dm750 "$pkgdir"/etc/hide.me/
install -Dm644 -t "$pkgdir"/etc/hide.me config
install -Dm644 -t "$pkgdir"/usr/lib/systemd/system/ hide.me@.service
}

View File

@@ -6,12 +6,14 @@ index b32902f..641241d 100644
[Service]
Type=notify
-ExecStart=/opt/hide.me/hide.me connect %i
-ExecStart=/opt/hide.me/hide.me connect $OPTIONS %i
-WorkingDirectory=/opt/hide.me
-ReadWritePaths=/opt/hide.me /etc
+ExecStart=/usr/bin/hide.me connect %i
-EnvironmentFile=/opt/hide.me/config
+ExecStart=/usr/bin/hide.me connect $OPTIONS %i
+WorkingDirectory=/usr/bin
+ReadWritePaths=/etc
+EnvironmentFile=/etc/hide.me/config
TimeoutStopSec=30
Restart=always
RestartSec=5s

30
systemd-config.patch Normal file
View File

@@ -0,0 +1,30 @@
diff --git a/config b/config
new file mode 100644
index 0000000..f0d2bfb
--- /dev/null
+++ b/config
@@ -0,0 +1 @@
+OPTIONS=
diff --git a/hide.me@.service b/hide.me@.service
index b32902f..46b44ef 100644
--- a/hide.me@.service
+++ b/hide.me@.service
@@ -6,9 +6,10 @@ DefaultDependencies=yes
[Service]
Type=notify
-ExecStart=/opt/hide.me/hide.me connect %i
+ExecStart=/opt/hide.me/hide.me connect $OPTIONS %i
WorkingDirectory=/opt/hide.me
ReadWritePaths=/opt/hide.me /etc
+EnvironmentFile=/opt/hide.me/config
TimeoutStopSec=30
Restart=always
RestartSec=5s
@@ -30,4 +31,4 @@ Group=root
LimitNOFILE=64
[Install]
-WantedBy=multi-user.target
\ No newline at end of file
+WantedBy=multi-user.target