overlay/net-im/mjolnir/files/mjolnir.initd
tastytea 9673462aa3
net-im/mjolnir: fix init script
I'm sure the check worked before, but now it fails? 😕

Signed-off-by: tastytea <tastytea@tastytea.de>
2022-11-25 16:11:26 +01:00

28 lines
647 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
}
# doesn't work all of a sudden for some reason
# start_pre() {
# local cfg=/opt/mjolnir/config/production.yaml
# if [[ -f ${cfg} ]]; then
# echo "${cfg} does not exist or is not a regular file" >&2
# return 1
# fi
# }