mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-10 07:04:03 +00:00
7302ab34d1
mpd5 daemon can be used as replacement for stock ppp(8) daemon to provide global connectivity (PPPoE, mobile networks etc.) Follow ppp(8) behavior and run startup script early before NETWORKING (and netwait), so other services that require working networking to be operational before starting won't fail. Bump PORTREVISION.
44 lines
837 B
Bash
44 lines
837 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: mpd5
|
|
# REQUIRE: netif
|
|
# BEFORE: routing
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable mpd5:
|
|
# mpd_enable (bool): Set to "NO" by default.
|
|
# Set it to "YES" to enable mpd5.
|
|
# mpd_flags (string): Set to "-b" by default.
|
|
# Extra flags passed to start command.
|
|
#
|
|
# See mpd5(8) for flags.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="mpd5"
|
|
rcvar=mpd_enable
|
|
|
|
load_rc_config ${name}
|
|
|
|
: ${mpd_enable="NO"}
|
|
: ${mpd_flags="-b"}
|
|
|
|
pidfile="/var/run/${name}.pid"
|
|
command="%%PREFIX%%/sbin/${name}"
|
|
required_files="%%PREFIX%%/etc/${name}/mpd.conf"
|
|
|
|
case "${mpd_flags}" in
|
|
*-p\ *)
|
|
echo "ERROR: \$mpd_flags includes -p option." \
|
|
"PID file is already set to $pidfile."
|
|
exit 1
|
|
;;
|
|
*)
|
|
command_args="-p ${pidfile} ${mpd_flags}"
|
|
;;
|
|
esac
|
|
|
|
run_rc_command "$1"
|