View | Details | Raw Unified | Return to bug 208410
Collapse All | Expand All

(-)www/tt-rss/Makefile (-10 / +4 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	tt-rss
4
PORTNAME=	tt-rss
5
PORTVERSION=	16.1.2016.02.23
5
PORTVERSION=	16.1.2016.02.23
6
PORTREVISION=	1
6
CATEGORIES=	www
7
CATEGORIES=	www
7
MASTER_SITES=	https://tt-rss.org/gitlab/fox/tt-rss/repository/archive${EXTRACT_SUFX}?ref=${GL_TAGNAME}#/
8
MASTER_SITES=	https://tt-rss.org/gitlab/fox/tt-rss/repository/archive${EXTRACT_SUFX}?ref=${GL_TAGNAME}#/
8
9
Lines 26-38 Link Here
26
27
27
USE_RC_SUBR=	ttrssd
28
USE_RC_SUBR=	ttrssd
28
29
29
OPTIONS_DEFINE=	CURL GD DBLOCAL
30
OPTIONS_DEFINE=	CURL GD
30
OPTIONS_SINGLE=	DB
31
OPTIONS_SINGLE=	DB
31
OPTIONS_SINGLE_DB=	MYSQL PGSQL
32
OPTIONS_SINGLE_DB=	MYSQL PGSQL
32
OPTIONS_DEFAULT=	CURL GD MYSQL DBLOCAL
33
OPTIONS_DEFAULT=	CURL GD MYSQL
33
CURL_DESC=	Use SimplePie instead of Magpie
34
CURL_DESC=	Use SimplePie instead of Magpie
34
GD_DESC=	Use OTP QR code generation
35
GD_DESC=	Use OTP QR code generation
35
DBLOCAL_DESC=	Database is local?
36
36
37
.include <bsd.port.options.mk>
37
.include <bsd.port.options.mk>
38
38
Lines 58-71 Link Here
58
USE_PHP+=	gd
58
USE_PHP+=	gd
59
.endif
59
.endif
60
60
61
.if ${PORT_OPTIONS:MDBLOCAL}
62
DBLOCAL=
63
.else
64
DBLOCAL=	"\#"
65
.endif
66
67
SUB_FILES=	httpd-tt-rss.conf pkg-message
61
SUB_FILES=	httpd-tt-rss.conf pkg-message
68
SUB_LIST=	DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL} DBLOCAL=${DBLOCAL}
62
SUB_LIST=	DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL}
69
PLIST_SUB=	WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
63
PLIST_SUB=	WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
70
PKGMESSAGE=	${WRKDIR}/pkg-message
64
PKGMESSAGE=	${WRKDIR}/pkg-message
71
65
(-)www/tt-rss/files/ttrssd.in (-4 / +11 lines)
Lines 7-16 Link Here
7
# REQUIRE: LOGIN mysql postgresql
7
# REQUIRE: LOGIN mysql postgresql
8
# KEYWORD: shutdown
8
# KEYWORD: shutdown
9
9
10
# Add the following line to /etc/rc.conf to enable `ttrssd':
10
# Add the following lines to /etc/rc.conf to enable `ttrssd':
11
#
11
#
12
#ttrssd_enable="YES"
12
# ttrssd_enable="YES"
13
#
13
#
14
# ttrssd_local_db (bool):   Set to "YES" by default.
15
#                           Set it to "NO" if the database is on another
16
#                           server.
14
17
15
. /etc/rc.subr
18
. /etc/rc.subr
16
19
Lines 20-25 Link Here
20
# read settings, set default values
23
# read settings, set default values
21
load_rc_config "${name}"
24
load_rc_config "${name}"
22
: ${ttrssd_enable="NO"}
25
: ${ttrssd_enable="NO"}
26
: ${ttrssd_local_db:="YES"}
23
27
24
required_files="%%WWWDIR%%/config.php"
28
required_files="%%WWWDIR%%/config.php"
25
pidfile="/var/run/${name}.pid"
29
pidfile="/var/run/${name}.pid"
Lines 30-36 Link Here
30
ttrssd_log="/var/log/${name}.log"
34
ttrssd_log="/var/log/${name}.log"
31
ttrssd_user="%%WWWOWN%%"
35
ttrssd_user="%%WWWOWN%%"
32
36
33
%%DBLOCAL%%start_precmd=${name}_prestart
37
start_precmd=${name}_prestart
34
start_cmd=${name}_start
38
start_cmd=${name}_start
35
stop_cmd=${name}_stop
39
stop_cmd=${name}_stop
36
40
Lines 56-62 Link Here
56
}
60
}
57
61
58
ttrssd_prestart() {
62
ttrssd_prestart() {
59
local _count=0
63
  if checkyesno ttrssd_local_db; then
64
	# Wait for the local database to be started
65
	local _count=0
60
66
61
	while : ; do
67
	while : ; do
62
		$CHECK_CMD > /dev/null 2>&1 && return
68
		$CHECK_CMD > /dev/null 2>&1 && return
Lines 67-72 Link Here
67
73
68
		sleep 1
74
		sleep 1
69
	done
75
	done
76
  fi
70
}
77
}
71
78
72
run_rc_command "$1"
79
run_rc_command "$1"

Return to bug 208410