diff options
author | Steven Kreuzer <skreuzer@FreeBSD.org> | 2024-05-26 13:28:27 +0000 |
---|---|---|
committer | Steven Kreuzer <skreuzer@FreeBSD.org> | 2024-05-26 13:31:38 +0000 |
commit | 099516e24bd625aeb524c5f9364b394c78af82b2 (patch) | |
tree | e38d42a168032ca9deb3b6b59ec3b0f51bcfcd68 | |
parent | 89cf498b91a92302d08746c5921a6b50b1f01f37 (diff) | |
download | ports-099516e24bd625aeb524c5f9364b394c78af82b2.tar.gz ports-099516e24bd625aeb524c5f9364b394c78af82b2.zip |
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>
-rw-r--r-- | net/ptpd2/Makefile | 2 | ||||
-rw-r--r-- | net/ptpd2/files/ptpd2.in | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/net/ptpd2/Makefile b/net/ptpd2/Makefile index 6deaa88b3a68..0248157471b0 100644 --- a/net/ptpd2/Makefile +++ b/net/ptpd2/Makefile @@ -1,6 +1,6 @@ PORTNAME= ptpd DISTVERSION= 2.3.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net PKGNAMESUFFIX= 2 diff --git a/net/ptpd2/files/ptpd2.in b/net/ptpd2/files/ptpd2.in index 19e341dc5796..d084ae8afb77 100644 --- a/net/ptpd2/files/ptpd2.in +++ b/net/ptpd2/files/ptpd2.in @@ -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" |