#!/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 # }