27 lines
697 B
Plaintext
27 lines
697 B
Plaintext
|
|
#!/bin/sh
|
||
|
|
|
||
|
|
# PROVIDE: meta_health_daemon
|
||
|
|
# REQUIRE: DAEMON NETWORKING hazelcast prefect_worker
|
||
|
|
# KEYWORD: shutdown
|
||
|
|
|
||
|
|
. /etc/rc.subr
|
||
|
|
|
||
|
|
name="meta_health_daemon"
|
||
|
|
rcvar="meta_health_daemon_enable"
|
||
|
|
load_rc_config $name
|
||
|
|
|
||
|
|
# Default settings
|
||
|
|
: ${meta_health_daemon_enable:="NO"}
|
||
|
|
: ${meta_health_daemon_user:="dolphin"}
|
||
|
|
: ${meta_health_daemon_root:="/mnt/dolphinng5_predict/prod"}
|
||
|
|
|
||
|
|
# Command setup
|
||
|
|
command="/usr/local/bin/python3"
|
||
|
|
command_args="${meta_health_daemon_root}/meta_health_daemon.py"
|
||
|
|
pidfile="/var/run/${name}.pid"
|
||
|
|
|
||
|
|
# Run command with nohup and redirect to log for basic daemonization
|
||
|
|
start_cmd="daemon -u ${meta_health_daemon_user} -p ${pidfile} ${command} ${command_args}"
|
||
|
|
|
||
|
|
run_rc_command "$1"
|