diff --git a/net-p2p/prowlarr/Makefile b/net-p2p/prowlarr/Makefile index d50d01787699..8847845fc052 100644 --- a/net-p2p/prowlarr/Makefile +++ b/net-p2p/prowlarr/Makefile @@ -1,44 +1,45 @@ PORTNAME= prowlarr PORTVERSION= 0.1.8.1231 +PORTREVISION= 1 CATEGORIES= net-p2p MASTER_SITES= https://github.com/Prowlarr/Prowlarr/releases/download/v${PORTVERSION}/ DISTNAME= Prowlarr.develop.${PORTVERSION}.freebsd-core-x64 MAINTAINER= michiel@vanbaak.eu COMMENT= Indexer Manager for Usenet and BitTorrent users LICENSE= GPLv3 ONLY_FOR_ARCHS= amd64 RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss \ icu>0:devel/icu \ libiconv>0:converters/libiconv \ libinotify>0:devel/libinotify \ libunwind>0:devel/libunwind \ openssl>0:security/openssl \ sqlite3>0:databases/sqlite3 USE_RC_SUBR= ${PORTNAME} NO_BUILD= YES SUB_FILES= ${PORTNAME} pkg-message SUB_LIST= DATADIR=${DATADIR} \ GROUPS=${GROUPS} \ PORTNAME=${PORTNAME} \ USERS=${USERS} USERS= ${PORTNAME} GROUPS= ${PORTNAME} WRKSRC= ${WRKDIR}/Prowlarr .include do-install: ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR} cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR} "! -name Prowlarr" ${INSTALL_PROGRAM} ${WRKSRC}/Prowlarr ${STAGEDIR}/${DATADIR} .include diff --git a/net-p2p/prowlarr/files/prowlarr.in b/net-p2p/prowlarr/files/prowlarr.in index db8c50e169dd..43e5bac3b626 100644 --- a/net-p2p/prowlarr/files/prowlarr.in +++ b/net-p2p/prowlarr/files/prowlarr.in @@ -1,48 +1,56 @@ #!/bin/sh # PROVIDE: %%PORTNAME%% # REQUIRE: LOGIN network # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf or use sysrc to enable %%PORTNAME%% # ${%%PORTNAME%%_enable="YES"} # Optionaly there are some other parameters # ${%%PORTNAME%%_user="%%USERS%%"} # ${%%PORTNAME%%_group="%%GROUPS%%"} # This stores %%PORTNAME%% data (e.g., databases, configs, logs) # ${%%PORTNAME%%_data_dir="%%PREFIX%%/%%PORTNAME%%"} # This stores the PID files that daemon will use # ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"} . /etc/rc.subr name=%%PORTNAME%% rcvar=%%PORTNAME%%_enable load_rc_config $name : ${%%PORTNAME%%_enable:=NO} : ${%%PORTNAME%%_user:="%%USERS%%"} : ${%%PORTNAME%%_group:="%%GROUPS%%"} : ${%%PORTNAME%%_exec_dir:="%%DATADIR%%"} : ${%%PORTNAME%%_data_dir:="%%PREFIX%%/%%PORTNAME%%"} : ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"} pidfile="${%%PORTNAME%%_pid_dir}/${name}_daemon.pid" pidfile_child="${%%PORTNAME%%_pid_dir}/${name}_child.pid" command="/usr/sbin/daemon" start_precmd=${name}_precmd %%PORTNAME%%_precmd() { if [ ! -d ${%%PORTNAME%%_data_dir} ]; then install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_data_dir} fi if [ ! -d ${%%PORTNAME%%_pid_dir} ]; then install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_pid_dir} fi + # .NET 6+ use dual mode sockets to avoid the separate AF handling. + # disable .NET use of V6 if no ipv6 is configured. + # See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259194#c17 + ifconfig | grep -q inet6 + if [ $? == 1 ]; then + export DOTNET_SYSTEM_NET_DISABLEIPV6=1 + fi + chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${%%PORTNAME%%_exec_dir} rc_flags="-r -f -p ${pidfile_child} -P ${pidfile} ${%%PORTNAME%%_exec_dir}/Prowlarr --data=${%%PORTNAME%%_data_dir} --nobrowser >> /dev/null 2>&1 ${rc_flags}" } run_rc_command "$1"