summaryrefslogtreecommitdiff
path: root/sys-cluster/teleport/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-23 04:19:44 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-23 04:19:44 +0000
commitc5283d322accc6097afec74eab24550829788bab (patch)
treeb99ce668128d82a026eaa31461643f9173f9b77b /sys-cluster/teleport/files
parent5510d9d7d1c93c2ea71a2bd6f0666168808d5dd6 (diff)
gentoo resync : 23.03.2018
Diffstat (limited to 'sys-cluster/teleport/files')
-rw-r--r--sys-cluster/teleport/files/teleport-2.5.init.d37
-rw-r--r--sys-cluster/teleport/files/teleport-2.5.service13
2 files changed, 50 insertions, 0 deletions
diff --git a/sys-cluster/teleport/files/teleport-2.5.init.d b/sys-cluster/teleport/files/teleport-2.5.init.d
new file mode 100644
index 000000000000..a951ec5318a0
--- /dev/null
+++ b/sys-cluster/teleport/files/teleport-2.5.init.d
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+: ${TELEPORT_CONFDIR:=/etc/teleport}
+: ${TELEPORT_PIDFILE:=/var/run/${SVCNAME}.pid}
+: ${TELEPORT_BINARY:=/usr/bin/teleport}
+: ${TELEPORT_LOGFILE:=/var/log/teleport.log}
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Teleport SSH Service"
+ start-stop-daemon --start --exec /usr/bin/teleport \
+ --background --make-pidfile --pidfile "${TELEPORT_PIDFILE}" \
+ --stderr "${TELEPORT_LOGFILE}" \
+ -- start --config="${TELEPORT_CONFDIR}/teleport.yaml" \
+ ${TELEPORT_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Teleport SSH Service"
+ start-stop-daemon --stop --exec /usr/bin/teleport \
+ --pidfile "${TELEPORT_PIDFILE}"
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP \
+ --exec "${TELEPORT_BINARY}" --pidfile "${TELEPORT_PIDFILE}"
+ eend $?
+}
diff --git a/sys-cluster/teleport/files/teleport-2.5.service b/sys-cluster/teleport/files/teleport-2.5.service
new file mode 100644
index 000000000000..37b38210aff4
--- /dev/null
+++ b/sys-cluster/teleport/files/teleport-2.5.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Teleport SSH Service
+After=network.target
+
+[Service]
+Type=simple
+Restart=on-failure
+ExecStart=/usr/bin/teleport start --config=/etc/teleport/teleport.yaml --pid-file=/var/run/teleport.pid
+ExecReload=/bin/kill -HUP $MAINPID
+PIDFile=/var/run/teleport.pid
+
+[Install]
+WantedBy=multi-user.target