Index: head/news/nzbhydra2/Makefile =================================================================== --- head/news/nzbhydra2/Makefile (revision 492463) +++ head/news/nzbhydra2/Makefile (revision 492464) @@ -1,52 +1,52 @@ # $FreeBSD$ PORTNAME= nzbhydra2 -DISTVERSION= 2.3.4 +DISTVERSION= 2.3.6 DISTVERSIONSUFFIX= -linux CATEGORIES= news java MASTER_SITES= https://github.com/theotherp/${PORTNAME}/releases/download/v${DISTVERSION}/ MAINTAINER= daniel@shafer.cc COMMENT= Usenet meta search LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= amd64 USES= python shebangfix zip USE_JAVA= yes USE_RC_SUBR= nzbhydra2 NO_BUILD= yes NO_WRKSUBDIR= yes SUB_FILES= nzbhydra2 nzbhydra2wrapper.py SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ JAVA=${JAVA} JAVA_VERSION= 1.8 1.9 1.10 1.11 JAVA_VENDOR= openjdk JAVA_RUN= yes USERS= nzbhydra2 GROUPS= nzbhydra2 -PLIST_FILES= ${DATADIR}/lib/core-2.3.4-exec.jar \ +PLIST_FILES= ${DATADIR}/lib/core-2.3.6-exec.jar \ ${DATADIR}/nzbhydra2 \ ${DATADIR}/nzbhydra2wrapper.py \ ${DATADIR}/changelog.md \ ${DATADIR}/readme.md \ ${DATADIR}/LICENSE post-extract: # Cleanup unnecessary files @${RM} -r ${WRKSRC}/systemd ${WRKSRC}/sysv ${WRKSRC}/rc.d ${WRKSRC}/upstart do-install: @${MKDIR} ${STAGEDIR}/${DATADIR} ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR} cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR} ${INSTALL_DATA} ${WRKDIR}/nzbhydra2wrapper.py ${STAGEDIR}/${DATADIR} .include Index: head/news/nzbhydra2/distinfo =================================================================== --- head/news/nzbhydra2/distinfo (revision 492463) +++ head/news/nzbhydra2/distinfo (revision 492464) @@ -1,3 +1,3 @@ -TIMESTAMP = 1549150850 -SHA256 (nzbhydra2-2.3.4-linux.zip) = 4c999d26886531ddba66d7c8e656da3fba50476abd722d8823d3cd128d8d5132 -SIZE (nzbhydra2-2.3.4-linux.zip) = 61624259 +TIMESTAMP = 1549478817 +SHA256 (nzbhydra2-2.3.6-linux.zip) = e3aef24aac61f9094f80cd7d93821a103058b4410bafe3ec7d183abaf40bd5dc +SIZE (nzbhydra2-2.3.6-linux.zip) = 61625733 Index: head/news/nzbhydra2/files/nzbhydra2.in =================================================================== --- head/news/nzbhydra2/files/nzbhydra2.in (revision 492463) +++ head/news/nzbhydra2/files/nzbhydra2.in (revision 492464) @@ -1,58 +1,61 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: nzbhydra2 # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # nzbhydra2_enable (bool): Set to NO by default. # Set it to YES to enable it. # nzbhydra2_user: The user account nzbhydra daemon runs as what # you want it to be. It uses '_sabnzbd' user by # default. Do not sets it as empty or it will run # as root. # nzbhydra2_group: The group account nzbhydra daemon runs as what # you want it to be. It uses 'nzbhydra2' group by # default. Do not sets it as empty or it will run # as wheel. # nzbhydra2_dir: Directory where nzbhydra lives. # Default: %%PREFIX%%/share/nzbhydra2 -# nzbhydra2_datafolder: Data directory for nzbhydra (DB, Logs, config) +# nzbhydra2_data_dir: Data directory for nzbhydra (DB, Logs, config) # Default: %%PREFIX%%/nzbhydra2 . /etc/rc.subr name="nzbhydra2" rcvar=${name}_enable load_rc_config ${name} : ${nzbhydra2_enable:="NO"} : ${nzbhydra2_user:="nzbhydra2"} : ${nzbhydra2_group:="nzbhydra2"} : ${nzbhydra2_dir:="%%PREFIX%%/share/nzbhydra2"} -: ${nzbhydra2_datafolder:="%%PREFIX%%/nzbhydra2"} +: ${nzbhydra2_data_dir:="%%PREFIX%%/nzbhydra2"} pidfile="/var/run/nzbhydra2/nzbhydra2.pid" command="%%PYTHON_CMD%%" -command_args="${nzbhydra2_dir}/nzbhydra2wrapper.py --datafolder ${nzbhydra2_datafolder} --pidfile ${pidfile} --daemon --nobrowser --java %%JAVA%%" +command_args="${nzbhydra2_dir}/nzbhydra2wrapper.py --datafolder ${nzbhydra2_data_dir} --pidfile ${pidfile} --daemon --nobrowser --java %%JAVA%%" +start_precmd=nzbhydra2_precmd -start_precmd="prestart" -prestart() { +nzbhydra2_precmd() +{ + export XDG_CONFIG_HOME=${nzbhydra2_data_dir} + if [ -f ${pidfile} ]; then rm -f ${pidfile} echo "Removing stale pidfile." elif [ ! -d ${pidfile%/*} ]; then install -d -o ${nzbhydra2_user} -g ${nzbhydra2_group} ${pidfile%/*} fi - if [ ! -d ${nzbhydra2_datadir} ]; then - install -d -o ${nzbhydra2_user} -g ${nzbhydra2_group} ${nzbhydra2_datadir} + if [ ! -d ${nzbhydra2_data_dir} ]; then + install -d -o ${nzbhydra2_user} -g ${nzbhydra2_group} ${nzbhydra2_data_dir} fi } run_rc_command "$1"