summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRanieri Althoff2019-05-11 03:02:29 -0300
committerRanieri Althoff2019-05-14 04:19:19 -0300
commit00da8db061cb3c06fe9529f0e31f23a152bf30c6 (patch)
treeb7ac90a1eb04630d73ce14d49927b71b7eacb35f
parentdf059dda0a87ff93f8a7ce96172510d8e4650d7e (diff)
downloadaur-00da8db061cb3c06fe9529f0e31f23a152bf30c6.tar.gz
Add systemd service
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD7
-rw-r--r--README.md6
-rw-r--r--nordconnect@.service10
4 files changed, 24 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 541303a5d96..b1a0a2deb95 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,7 +9,9 @@ pkgbase = nordconnect
optdepends = nordselect: select the ideal server
optdepends = openvpn-update-systemd-resolved: use NordVPN DNS servers with systemd-resolved
source = nordconnect
- sha256sums = fcbece552d66bc97073e6578e27417bdc95a89c7b768ee82c606c996c3998915
+ source = nordconnect@.service
+ sha256sums = 907cd2e76802fd0e56b092e3af3803380e1045d42d354a84df0ca842ddf11862
+ sha256sums = 6531f9d2ee64a788fe99e2be82da10fe70fecdcc7c0b614fa2dae6551ed53487
pkgname = nordconnect
diff --git a/PKGBUILD b/PKGBUILD
index 4598170f875..e3d4c42300a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,11 +10,14 @@ license=('GPL3')
depends=('openvpn')
optdepends=('nordselect: select the ideal server'
'openvpn-update-systemd-resolved: use NordVPN DNS servers with systemd-resolved')
-source=(nordconnect)
-sha256sums=('fcbece552d66bc97073e6578e27417bdc95a89c7b768ee82c606c996c3998915')
+source=(nordconnect
+ nordconnect@.service)
+sha256sums=('907cd2e76802fd0e56b092e3af3803380e1045d42d354a84df0ca842ddf11862'
+ '6531f9d2ee64a788fe99e2be82da10fe70fecdcc7c0b614fa2dae6551ed53487')
package() {
install -Dm755 nordconnect "${pkgdir}/usr/bin/nordconnect"
+ install -Dm755 nordconnect@.service "${pkgdir}/usr/lib/systemd/user/nordconnect@.service"
}
# vim:set ts=2 sw=2 et:
diff --git a/README.md b/README.md
index 66369138bc6..97f1aeaa506 100644
--- a/README.md
+++ b/README.md
@@ -29,5 +29,11 @@ $ nordconnect us123
$ nordconnect $(nordselect us)
```
+### Systemd service
+nordconnect ships with a systemd service unit, taking a server argument. Start/enable it with:
+```
+systemctl --user start nordconnect@<server>.service
+```
+
## License
This project is licensed under the [GNU General Public License version 3](https://opensource.org/licenses/GPL-3.0)
diff --git a/nordconnect@.service b/nordconnect@.service
new file mode 100644
index 00000000000..c58e4198bdf
--- /dev/null
+++ b/nordconnect@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Connect to a NordVPN server
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/nordconnect %I
+Restart=on-failure
+
+[Install]
+WantedBy=default.target