No need for handcrafted rc_start, use daemon_flags.

This commit is contained in:
ajacoutot 2022-05-26 10:33:31 +00:00
parent 203bc3335c
commit 793494a073
2 changed files with 2 additions and 8 deletions

View File

@ -4,7 +4,7 @@ GH_ACCOUNT= blueness
GH_PROJECT= sthttpd
GH_TAGNAME= v2.27.1
CATEGORIES= www
REVISION= 0
REVISION= 1
HOMEPAGE= https://github.com/blueness/sthttpd

View File

@ -1,16 +1,10 @@
#!/bin/ksh
daemon="${TRUEPREFIX}/sbin/thttpd"
daemon_flags="-d /var/www"
. /etc/rc.d/rc.subr
rc_stop_signal=USR1
# The /var/www root directory will be overridden by any -d flag the user
# supplies. This addresses the awkward fact that thttpd defaults to the
# current working directory.
rc_start() {
rc_exec "cd /var/www; ${daemon} ${daemon_flags}"
}
rc_cmd $1