about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-06 15:43:10 -0500
committerJune McEnroe <june@causal.agency>2019-01-06 15:43:10 -0500
commit3d5ac5c7082f679553838166b6f4ba04b7db1f25 (patch)
treefd1107f7abff77fa0f248c59fc0eaeb8f8f168d7
parentAdd image and font to chroot (diff)
downloadtorus-3d5ac5c7082f679553838166b6f4ba04b7db1f25.tar.gz
torus-3d5ac5c7082f679553838166b6f4ba04b7db1f25.zip
Add kfcgi rc file
-rw-r--r--Makefile5
-rw-r--r--rc.kfcgi18
2 files changed, 21 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8059b83..72959ff 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ image.o: png.h
 tags: *.h *.c
 	ctags -w *.h *.c
 
-chroot.tar: client image server
+chroot.tar: client image server default8x16.psfu
 	install -d -o root -g wheel \
 		root \
 		root/bin \
@@ -41,8 +41,9 @@ chroot.tar: client image server
 	install -m 644 default8x16.psfu root/usr/share/torus
 	tar -cf chroot.tar -C root bin home usr var
 
-install: chroot.tar rc.torus
+install: chroot.tar rc.kfcgi rc.torus
 	tar -xf chroot.tar -C /home/$(CHROOT_USER)
+	install rc.kfcgi /usr/local/etc/rc.d/kfcgi
 	install rc.torus /usr/local/etc/rc.d/torus
 
 clean:
diff --git a/rc.kfcgi b/rc.kfcgi
new file mode 100644
index 0000000..6baa122
--- /dev/null
+++ b/rc.kfcgi
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# PROVIDE: kfcgi
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name=kfcgi
+rcvar=kfcgi_enable
+load_rc_config ${name}
+
+: ${kfcgi_enable:=NO}
+kfcgi_flags="${kfcgi_flags} -- ${kfcgi_prog}"
+
+command=/usr/local/sbin/kfcgi
+
+run_rc_command "$1"