Index: www/tt-rss/Makefile =================================================================== --- www/tt-rss/Makefile (revision 413229) +++ www/tt-rss/Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= tt-rss PORTVERSION= 16.1.2016.02.23 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://tt-rss.org/gitlab/fox/tt-rss/repository/archive${EXTRACT_SUFX}?ref=${GL_TAGNAME}#/ @@ -26,13 +27,12 @@ USE_RC_SUBR= ttrssd -OPTIONS_DEFINE= CURL GD DBLOCAL +OPTIONS_DEFINE= CURL GD OPTIONS_SINGLE= DB OPTIONS_SINGLE_DB= MYSQL PGSQL -OPTIONS_DEFAULT= CURL GD MYSQL DBLOCAL +OPTIONS_DEFAULT= CURL GD MYSQL CURL_DESC= Use SimplePie instead of Magpie GD_DESC= Use OTP QR code generation -DBLOCAL_DESC= Database is local? .include @@ -58,14 +58,8 @@ USE_PHP+= gd .endif -.if ${PORT_OPTIONS:MDBLOCAL} -DBLOCAL= -.else -DBLOCAL= "\#" -.endif - SUB_FILES= httpd-tt-rss.conf pkg-message -SUB_LIST= DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL} DBLOCAL=${DBLOCAL} +SUB_LIST= DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL} PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} PKGMESSAGE= ${WRKDIR}/pkg-message Index: www/tt-rss/files/ttrssd.in =================================================================== --- www/tt-rss/files/ttrssd.in (revision 413229) +++ www/tt-rss/files/ttrssd.in (working copy) @@ -7,10 +7,13 @@ # REQUIRE: LOGIN mysql postgresql # KEYWORD: shutdown -# Add the following line to /etc/rc.conf to enable `ttrssd': +# Add the following lines to /etc/rc.conf to enable `ttrssd': # -#ttrssd_enable="YES" +# ttrssd_enable="YES" # +# ttrssd_local_db (bool): Set to "YES" by default. +# Set it to "NO" if the database is on another +# server. . /etc/rc.subr @@ -20,6 +23,7 @@ # read settings, set default values load_rc_config "${name}" : ${ttrssd_enable="NO"} +: ${ttrssd_local_db:="YES"} required_files="%%WWWDIR%%/config.php" pidfile="/var/run/${name}.pid" @@ -30,7 +34,7 @@ ttrssd_log="/var/log/${name}.log" ttrssd_user="%%WWWOWN%%" -%%DBLOCAL%%start_precmd=${name}_prestart +start_precmd=${name}_prestart start_cmd=${name}_start stop_cmd=${name}_stop @@ -56,7 +60,9 @@ } ttrssd_prestart() { -local _count=0 + if checkyesno ttrssd_local_db; then + # Wait for the local database to be started + local _count=0 while : ; do $CHECK_CMD > /dev/null 2>&1 && return @@ -67,6 +73,7 @@ sleep 1 done + fi } run_rc_command "$1"