aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rest-server/rest-server.initd
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2018-07-24 16:59:01 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2018-07-25 00:03:27 +0200
commit4e8f63fcab59d1eb03297f32e88b2d18cdbd31b6 (patch)
treee985d614a4971a0dac1cf4b89f6d6a0092e26218 /testing/rest-server/rest-server.initd
parent698fe31ce35c3da127dbe6f10160aa96e7d435eb (diff)
downloadaports-4e8f63fcab59d1eb03297f32e88b2d18cdbd31b6.tar.bz2
aports-4e8f63fcab59d1eb03297f32e88b2d18cdbd31b6.tar.xz
testing/rest-server: add -openrc subpackage
Diffstat (limited to 'testing/rest-server/rest-server.initd')
-rw-r--r--testing/rest-server/rest-server.initd18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/rest-server/rest-server.initd b/testing/rest-server/rest-server.initd
new file mode 100644
index 0000000000..25745876e3
--- /dev/null
+++ b/testing/rest-server/rest-server.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+name="rest-server"
+command="/usr/bin/$name"
+command_args="$REST_SERVER_OPTS --path '${REST_SERVER_PATH}'"
+command_background="yes"
+command_user="${REST_USER:-restic}"
+pidfile="/var/run/$RC_SVCNAME.pid"
+
+depend() {
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --directory "${REST_SERVER_PATH}" \
+ --owner "${REST_USER:-restic}:${REST_GROUP:-restic}"
+}