+30
systemd/knotserver.openrc
+30
systemd/knotserver.openrc
···
···
1
+
#!/sbin/openrc-run
2
+
3
+
name="knot"
4
+
description="tangled knot server"
5
+
6
+
pidfile="/var/run/${name}.pid"
7
+
8
+
depend() {
9
+
need net
10
+
}
11
+
12
+
# Export the configuration variables so that
13
+
# they are also accessible by the knot server.
14
+
start_pre() {
15
+
export KNOT_REPO_SCAN_PATH
16
+
export KNOT_SERVER_HOSTNAME
17
+
export APPVIEW_ENDPOINT
18
+
export KNOT_SERVER_SECRET
19
+
export KNOT_SERVER_INTERNAL_LISTEN_ADDR
20
+
export KNOT_SERVER_LISTEN_ADDR
21
+
}
22
+
23
+
command="/usr/local/bin/knot"
24
+
command_args="server"
25
+
26
+
# The knot server is run foreground, make sure it is started as a daemon
27
+
command_background=true
28
+
29
+
command_user="git"
30
+
directory="/home/git"