mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-17 19:39:43 +00:00
dns/doh-proxy: Add rc script
PR: 256829
This commit is contained in:
parent
7676dc0a00
commit
958cdc4cbf
@ -1,6 +1,6 @@
|
||||
PORTNAME= doh-proxy
|
||||
DISTVERSION= 0.9.11
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= dns
|
||||
MASTER_SITES= CRATESIO
|
||||
DISTFILES= ${CARGO_DIST_SUBDIR}/${DISTNAME}${CARGO_CRATE_EXT}
|
||||
@ -15,6 +15,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
BROKEN_i386= fails to build
|
||||
USES= cargo
|
||||
|
||||
USE_RC_SUBR= doh-proxy
|
||||
|
||||
PLIST_FILES= bin/doh-proxy
|
||||
|
||||
# make cargo-crates > Makefile.crates
|
||||
|
36
dns/doh-proxy/files/doh-proxy.in
Normal file
36
dns/doh-proxy/files/doh-proxy.in
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: doh-proxy
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following line in /etc/rc.conf to enable doh-proxy:
|
||||
#
|
||||
# doh_proxy_enable="YES"
|
||||
# doh_proxy_flags="<set as needed>"
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=doh_proxy
|
||||
rcvar=doh_proxy_enable
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${doh_proxy_enable:="NO"}
|
||||
: ${doh_proxy_flags:=""}
|
||||
|
||||
command="%%PREFIX%%/bin/doh-proxy"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
|
||||
start_cmd="${name}_start"
|
||||
|
||||
doh_proxy_start()
|
||||
{
|
||||
echo -n "Starting ${name}."
|
||||
/usr/sbin/daemon -u nobody -S -p ${pidfile} \
|
||||
${command} ${doh_proxy_flags} && \
|
||||
echo "Done"
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
Loading…
Reference in New Issue
Block a user