summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2017-07-06 23:59:43 +0200
committerPatrice Clement <monsieurp@gentoo.org>2017-07-07 00:08:47 +0200
commita294529672562d6b8cd77e26ca4206170e49215e (patch)
tree2605647162e0cb4ab0f98327bbb198c2066be549 /net-misc/zerotier/files
parentsci-astronomy/casacore: version bump (diff)
downloadgentoo-a294529672562d6b8cd77e26ca4206170e49215e.tar.gz
gentoo-a294529672562d6b8cd77e26ca4206170e49215e.tar.bz2
gentoo-a294529672562d6b8cd77e26ca4206170e49215e.zip
net-misc/zerotier: new ebuild.
zerotier-one is a smart Ethernet switch for Earth. Gentoo-Bug: https://bugs.gentoo.org/588324 Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'net-misc/zerotier/files')
-rw-r--r--net-misc/zerotier/files/zerotier.init22
-rw-r--r--net-misc/zerotier/files/zerotier.service11
2 files changed, 33 insertions, 0 deletions
diff --git a/net-misc/zerotier/files/zerotier.init b/net-misc/zerotier/files/zerotier.init
new file mode 100644
index 000000000000..7d226552dad2
--- /dev/null
+++ b/net-misc/zerotier/files/zerotier.init
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+
+ZEROTIERONE_PIDFILE="/var/run/${SVCNAME}.pid"
+PN="zerotier-one"
+PN_PATH="/usr/bin/${PN}"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${PN}"
+ start-stop-daemon --start \
+ --exec "${PN_PATH}" --make-pidfile --pidfile "${ZEROTIERONE_PIDFILE}" --background
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${PN}"
+ start-stop-daemon --stop --quiet --pidfile "${ZEROTIERONE_PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/zerotier/files/zerotier.service b/net-misc/zerotier/files/zerotier.service
new file mode 100644
index 000000000000..c4a1c4d29979
--- /dev/null
+++ b/net-misc/zerotier/files/zerotier.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=ZeroTier One
+After=network.target
+
+[Service]
+ExecStart=/var/lib/zerotier-one/zerotier-one
+Restart=always
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target