TheArtificer/artificer.rc

22 lines
710 B
Plaintext
Raw Normal View History

2022-07-07 17:07:28 -07:00
#!/bin/sh
2022-07-07 17:20:44 -07:00
# PROVIDE: artificer
2022-07-07 17:07:28 -07:00
. /etc/rc.subr
name="artificer"
rcvar="artificer_enable"
2022-07-07 17:50:16 -07:00
pidfile="/var/dbots/TheArtificer/artificer.pid"
2022-07-07 17:07:28 -07:00
2022-07-07 22:36:24 -07:00
artificer_root="/var/dbots/TheArtificer"
artificer_write="./logs/,./src/endpoints/gets/heatmap.png"
artificer_read="./src/solver/,./src/endpoints/gets/heatmap-base.png,./src/endpoints/gets/heatmap.png,./config.ts,./deps.ts,./src/mod.d.ts"
artificer_log="/var/log/artificer.log"
2022-07-07 22:36:24 -07:00
artificer_chdir="${artificer_root}"
2022-07-07 17:50:16 -07:00
command="/usr/sbin/daemon"
command_args="-f -R 5 -P ${pidfile} -o ${artificer_log} /usr/local/bin/deno run --allow-write=${artificer_write} --allow-read=${artificer_read} --allow-net ${artificer_root}/mod.ts"
2022-07-07 17:07:28 -07:00
load_rc_config artificer
run_rc_command "$1"