From 0c0c175f5c080447ca6c59b00da18ff540e7f0fd Mon Sep 17 00:00:00 2001 From: Ean Milligan Date: Thu, 23 Apr 2026 17:54:07 -0400 Subject: [PATCH] add start command --- start.command | 2 +- xivplan-db.rc | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 xivplan-db.rc diff --git a/start.command b/start.command index fde1ef2..1bd2db5 100644 --- a/start.command +++ b/start.command @@ -1 +1 @@ -deno run --allow-net --allow-import mod.ts \ No newline at end of file +deno run --allow-net --allow-import --allow-env --allow-read --allow-write --allow-ffi mod.ts \ No newline at end of file diff --git a/xivplan-db.rc b/xivplan-db.rc new file mode 100755 index 0000000..a07d2bd --- /dev/null +++ b/xivplan-db.rc @@ -0,0 +1,19 @@ +#!/bin/sh + +# PROVIDE: xivplan-db + +. /etc/rc.subr + +name="xivplan-db" +rcvar="xivplan-db_enable" +pidfile="/var/webapps/XIVPlan-DB/xivplan-db.pid" + +xivplan-db_root="/var/webapps/XIVPlan-DB" +xivplan-db_log="/var/log/xivplan-db.log" + +xivplan-db_chdir="${xivplan-db_root}" +command="/usr/sbin/daemon" +command_args="-f -R 5 -P ${pidfile} -o ${xivplan-db_log} /usr/local/bin/deno run --allow-net --allow-import --allow-env --allow-read --allow-write --allow-ffi ${xivplan-db_root}/mod.ts" + +load_rc_config xivplan-db +run_rc_command "$1"