···11+#!/sbin/openrc-run
22+33+name="knot"
44+description="tangled knot server"
55+66+pidfile="/var/run/${name}.pid"
77+88+depend() {
99+ need net
1010+}
1111+1212+# Export the configuration variables so that
1313+# they are also accessible by the knot server.
1414+start_pre() {
1515+ export KNOT_REPO_SCAN_PATH
1616+ export KNOT_SERVER_HOSTNAME
1717+ export APPVIEW_ENDPOINT
1818+ export KNOT_SERVER_SECRET
1919+ export KNOT_SERVER_INTERNAL_LISTEN_ADDR
2020+ export KNOT_SERVER_LISTEN_ADDR
2121+}
2222+2323+command="/usr/local/bin/knot"
2424+command_args="server"
2525+2626+# The knot server is run foreground, make sure it is started as a daemon
2727+command_background=true
2828+2929+command_user="git"
3030+directory="/home/git"