Index: head/net-p2p/sonarr/Makefile =================================================================== --- head/net-p2p/sonarr/Makefile (revision 569053) +++ head/net-p2p/sonarr/Makefile (revision 569054) @@ -1,45 +1,45 @@ # $FreeBSD$ PORTNAME= sonarr PORTVERSION= 3.0.5.1144 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net-p2p MASTER_SITES= http://download.sonarr.tv/v3/main/${PORTVERSION}/ DISTNAME= Sonarr.main.${PORTVERSION}.linux MAINTAINER= feld@FreeBSD.org COMMENT= PVR for Usenet and BitTorrent users LICENSE= GPLv3 LIB_DEPENDS= libcurl.so:ftp/curl RUN_DEPENDS= mediainfo>0:multimedia/mediainfo \ sqlite3>0:databases/sqlite3 USES= mono USE_RC_SUBR= sonarr NO_ARCH= YES NO_BUILD= YES WRKSRC= ${WRKDIR}/Sonarr USERS= sonarr GROUPS= sonarr OPTIONS_DEFINE= X11 # Permits image resizing X11_LIB_DEPENDS+=libgdiplus.so:x11-toolkits/libgdiplus .include do-install: ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR} cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR} post-install: @${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} .include Index: head/net-p2p/sonarr/files/sonarr.in =================================================================== --- head/net-p2p/sonarr/files/sonarr.in (revision 569053) +++ head/net-p2p/sonarr/files/sonarr.in (revision 569054) @@ -1,41 +1,45 @@ #!/bin/sh # # Author: Mark Felder # # $FreeBSD$ # # PROVIDE: sonarr # REQUIRE: LOGIN # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable sonarr: # sonarr_enable="YES" . /etc/rc.subr name="sonarr" rcvar=sonarr_enable load_rc_config $name : ${sonarr_enable="NO"} : ${sonarr_user:="sonarr"} : ${sonarr_data_dir:="%%PREFIX%%/sonarr"} -pidfile="${sonarr_data_dir}/nzbdrone.pid" +pidfile="${sonarr_data_dir}/sonarr.pid" procname="%%PREFIX%%/bin/mono" command="/usr/sbin/daemon" -command_args="-f ${procname} %%DATADIR%%/NzbDrone.exe --nobrowser --data=${sonarr_data_dir}" +command_args="-f ${procname} %%DATADIR%%/Sonarr.exe --nobrowser --data=${sonarr_data_dir}" start_precmd=sonarr_precmd sonarr_precmd() { export XDG_CONFIG_HOME=${sonarr_data_dir} if [ ! -d ${sonarr_data_dir} ]; then install -d -o ${sonarr_user} ${sonarr_data_dir} fi + + # Unwritable pids allow the service to start, but fails to work + # Rare, but if you are debugging as root and accidentally start the service... + /bin/rm -f ${pidfile} } run_rc_command "$1"