1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

net/ptpd2: Add default configfile to rc script

Add a default configfile to the rc script to allow ptpd2 to start up

PR:             279025
Reported by:    Ekkehard 'Ekki' Gehm <gehm@sudoers.net>
This commit is contained in:
Steven Kreuzer 2024-05-26 13:28:27 +00:00
parent 89cf498b91
commit 099516e24b
No known key found for this signature in database
GPG Key ID: 66BAB4B6E0D6F907
2 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= ptpd
DISTVERSION= 2.3.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
PKGNAMESUFFIX= 2

View File

@ -8,15 +8,21 @@
#
# ptpd2_enable (bool): Set to "NO" by default
# Set it to "YES" to enable ptpd
# ptp2_configfile (str): Set to "/usr/local/etc/ptpd2/ptpd2.conf" by default
. /etc/rc.subr
name="ptpd2"
name=ptpd2
rcvar=ptpd2_enable
command="%%PREFIX%%/sbin/${name}"
load_rc_config "${name}"
ptpd2_enable=${ptpd2_enable:-"NO"}
: ${ptpd2_enable:=NO}
: ${ptpd2_configfile:=/usr/local/etc/ptpd2/ptpd2.conf}
required_files="${ptpd2_configfile}"
command="/usr/local/sbin/${name}"
command_args="-c ${ptpd2_configfile}"
load_rc_config $name
run_rc_command "$1"