summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHexchain Tong2015-10-27 23:20:47 +0800
committerHexchain Tong2015-10-27 23:20:47 +0800
commit7c6a762a7cab6e480e7a3d66fae07bda0bc058ca (patch)
tree97163d34542508ef38a0109219103b50e3669362
parent268afab95a1e88684c747d519cf4eecb6ef6c8d6 (diff)
downloadaur-7c6a762a7cab6e480e7a3d66fae07bda0bc058ca.tar.gz
merge tinc-pre-systemd into this package
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD17
-rw-r--r--tincd.service11
-rw-r--r--tincd@.service12
4 files changed, 42 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8bfd698eeb0..1ecaf24e002 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = tinc-pre
pkgdesc = VPN (Virtual Private Network) daemon (Pre-release)
pkgver = 1.1pre11
- pkgrel = 3
+ pkgrel = 4
url = http://www.tinc-vpn.org/
install = tinc-pre.install
arch = i686
@@ -11,9 +11,15 @@ pkgbase = tinc-pre
depends = openssl
optdepends = wxpython: gui support
provides = tinc-pre
+ provides = tinc-pre-systemd
conflicts = tinc
+ conflicts = tinc-pre-systemd
source = http://www.tinc-vpn.org/packages/tinc-1.1pre11.tar.gz
+ source = tincd.service
+ source = tincd@.service
sha256sums = 942594563d3aef926a2d04e9ece90c16daf1c700e99e3b91ff749e8377fbf757
+ sha256sums = 35d76d63e0403550bf68632603cf6e51352f6b85f0269853af875f6b434fb9e1
+ sha256sums = 4783faab2589ba67dc6fceb2e37a736914cc5afc2f741aadf990e027f0b957f2
pkgname = tinc-pre
diff --git a/PKGBUILD b/PKGBUILD
index 526e947e25c..4005875cc50 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,17 +2,19 @@
pkgname=tinc-pre
pkgver=1.1pre11
-pkgrel=3
+pkgrel=4
pkgdesc="VPN (Virtual Private Network) daemon (Pre-release)"
arch=(i686 x86_64)
url="http://www.tinc-vpn.org/"
license=('GPL')
depends=('lzo2' 'openssl')
optdepends=('wxpython: gui support')
-provides=('tinc-pre')
-conflicts=('tinc')
+provides=('tinc-pre' 'tinc-pre-systemd')
+conflicts=('tinc' 'tinc-pre-systemd')
install="${pkgname}.install"
-source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz)
+source=(http://www.tinc-vpn.org/packages/tinc-$pkgver.tar.gz
+ tincd.service
+ tincd@.service)
build() {
cd "$srcdir/tinc-$pkgver"
@@ -28,7 +30,12 @@ package() {
mkdir -p "$pkgdir/etc/tinc/"
install -Dm644 "$srcdir/tinc-$pkgver/doc/sample-config.tar.gz" -t "$pkgdir/usr/share/doc/tinc-pre/"
+ install -Dm644 "$srcdir/tincd.service" -t "$pkgdir/usr/lib/systemd/system"
+ install -Dm644 "$srcdir/tincd@.service" -t "$pkgdir/usr/lib/systemd/system"
+
sed -i 's,#!/usr/bin/env python,#!/usr/bin/env python2,' "$pkgdir/usr/bin/tinc-gui"
}
-sha256sums=('942594563d3aef926a2d04e9ece90c16daf1c700e99e3b91ff749e8377fbf757')
+sha256sums=('942594563d3aef926a2d04e9ece90c16daf1c700e99e3b91ff749e8377fbf757'
+ '35d76d63e0403550bf68632603cf6e51352f6b85f0269853af875f6b434fb9e1'
+ '4783faab2589ba67dc6fceb2e37a736914cc5afc2f741aadf990e027f0b957f2')
diff --git a/tincd.service b/tincd.service
new file mode 100644
index 00000000000..993fc21b449
--- /dev/null
+++ b/tincd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=tinc vpn
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/tincd --no-detach --user=nobody
+ExecReload=/usr/bin/tinc reload
+
+[Install]
+WantedBy=multi-user.target
diff --git a/tincd@.service b/tincd@.service
new file mode 100644
index 00000000000..9be81b41dad
--- /dev/null
+++ b/tincd@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=tinc vpn on network %i
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/tincd --user=nobody --net=%i
+ExecReload=/usr/bin/tinc --net %I reload
+Restart=on-abnormal
+
+[Install]
+WantedBy=multi-user.target