overlay/net-im/mjolnir/files/mjolnir.initd
tastytea 835b762480
net-im/mjolnir: new package, add 1.5.0
Signed-off-by: tastytea <tastytea@tastytea.de>
2022-10-31 10:41:30 +01:00

24 lines
563 B
Plaintext

#!/sbin/openrc-run
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="mjolnir daemon"
description="mjolnir daemon"
command=/usr/bin/node
command_args="mjolnir/index.js"
command_user="${MJOLNIR_USER:-synapse}"
supervisor="supervise-daemon"
supervise_daemon_args=" -d /opt/mjolnir -e NODE_ENV=\"production\""
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
}
start_pre() {
local cfg=/opt/mjolnir/config/production.yaml
[[ -f ${cfg} ]] || echo "${cfg} does not exist or is not a regular file" >&2
}