-
-
Save alealexpro100/14e845f5f77b5e0d9da107b640cc72d6 to your computer and use it in GitHub Desktop.
MeshCentral OpenRC service using mariadb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
name="mesh" | |
description="meshcentral service" | |
command="/usr/bin/node /home/$name/node_modules/meshcentral" | |
command_background="yes" | |
user="$name" | |
group="$user" | |
depend() { | |
need net localmount mariadb | |
after firewall | |
} | |
start() { | |
ebegin "Starting ${name}" | |
export NODE_ENV=production | |
start-stop-daemon --exec ${command} \ | |
--background \ | |
-k 0002 \ | |
-u ${user} -g ${group} \ | |
--start -- ${command_args} | |
eend $? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment