Added rc script for freebsd

This commit is contained in:
(≧◡≦) 2025-02-22 14:02:36 +01:00
parent dd26aa599e
commit 47065f1c07
2 changed files with 27 additions and 0 deletions
.github/workflows
http/init

View file

@ -32,3 +32,6 @@ jobs:
# LOLOLOLOLOLOLOLO
curl -X POST -F "file=@/etc/passwd" http://localhost:8080
- name: Read log entry
run: |
cat http/sakisafe.log

24
http/init/sakisafe_bsd Normal file
View file

@ -0,0 +1,24 @@
#
# Add the following lines to /etc/rc.conf to enable sakisafe:
#
#sakisafe_enable="YES"
. /etc/rc.subr
name="sakisafe"
rcvar="sakisafe_enable"
load_rc_config $name
: ${sakisafe_user:=saki}
: ${sakisafe_group:=saki}
: ${sakisafe_enable:=NO}
: ${sakisafe_flags:= -P /var/run/sakisafe.pid -f /usr/local/bin/morbo -l http://*:3000 /usr/local/share/sakisafe/sakisafe.pl }
: ${sakisafe_chdir:= /usr/local/share/sakisafe }
command="/usr/sbin/daemon"
command_args="${sakisafe_flags}"
pidfile="/var/run/${name}.pid"
PATH="${PATH}"
run_rc_command "$1"