mirror of
https://github.com/tschettervictor/bsd-apps.git
synced 2026-01-05 12:14:20 +01:00
Create meshcentral
This commit is contained in:
24
meshcentral/usr/local/etc/rc.d/meshcentral
Normal file
24
meshcentral/usr/local/etc/rc.d/meshcentral
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
# MeshCentral FreeBSD Service Script
|
||||
|
||||
# PROVIDE: meshcentral
|
||||
# REQUIRE: NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=meshcentral
|
||||
user=meshcentral
|
||||
rcvar=meshcentral_enable
|
||||
|
||||
: ${meshcentral_enable:="NO"}
|
||||
: ${meshcentral_args:=""}
|
||||
|
||||
pidfile=/var/run/${name}/${name}.pid
|
||||
command="/usr/sbin/daemon"
|
||||
meshcentral_chdir="/usr/local/meshcentral/node_modules"
|
||||
command_args="-r -u ${user} -P ${pidfile} /usr/local/bin/node ${meshcentral_chdir}/${name} ${meshcentral_args}"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
Reference in New Issue
Block a user