No need for handcrafted rc_start, use daemon_flags.
This commit is contained in:
parent
203bc3335c
commit
793494a073
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue