21 lines
475 B
Bash
21 lines
475 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: sweeper
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="sweeper"
|
|
rcvar="sweeper_enable"
|
|
pidfile="/var/dbots/SweeperBot/sweeper.pid"
|
|
|
|
sweeper_root="/var/dbots/SweeperBot"
|
|
sweeper_write="./logs/"
|
|
sweeper_log="/var/log/sweeper.log"
|
|
|
|
sweeper_chdir="${sweeper_root}"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-f -R 5 -P ${pidfile} -o ${sweeper_log} /usr/local/bin/deno run --allow-write=${sweeper_write} --allow-net ${sweeper_root}/mod.ts"
|
|
|
|
load_rc_config sweeper
|
|
run_rc_command "$1"
|