View | Details | Raw Unified | Return to bug 279803 | Differences between
and this patch

Collapse All | Expand All

(-)b/UPDATING (+8 lines)
Lines 5-10 they are unavoidable. Link Here
5
You should get into the habit of checking this file for changes each time
5
You should get into the habit of checking this file for changes each time
6
you update your ports collection, before attempting any port upgrades.
6
you update your ports collection, before attempting any port upgrades.
7
7
8
20240617:
9
  AFFECTS: www/tt-rss
10
  AUTHOR: dereks@lifeofadishwasher.com
11
12
  The ttrssd_local_db rc var has been removed in favor of using daemon's
13
  restart option -r to retry the ttrssd php scripts if database is not up
14
  before ttrssd starts.
15
8
20240615:
16
20240615:
9
  AFFECTS: mail/cyrus-imapd25
17
  AFFECTS: mail/cyrus-imapd25
10
  AUTHOR: ume@FreeBSD.org
18
  AUTHOR: ume@FreeBSD.org
(-)b/www/tt-rss/files/ttrssd.in (-3 / +37 lines)
Lines 22-35 load_rc_config "${name}" Link Here
22
long_name="Tiny Tiny RSS updating feeds daemon."
22
long_name="Tiny Tiny RSS updating feeds daemon."
23
required_files="%%WWWDIR%%/config.php"
23
required_files="%%WWWDIR%%/config.php"
24
pidfile="/var/run/${name}.pid"
24
pidfile="/var/run/${name}.pid"
25
cpidfile="/var/run/${name}_child.pid"
26
phpcli="%%LOCALBASE%%/bin/php"
25
27
26
initdb_php="%%WWWDIR%%/update.php"
28
initdb_php="%%WWWDIR%%/update.php"
27
phpupd="%%WWWDIR%%/update_daemon2.php"
29
phpupd="%%WWWDIR%%/update_daemon2.php"
28
ttrssd_log="/var/log/${name}.log"
30
ttrssd_log="/var/log/${name}.log"
29
31
30
command="/usr/sbin/daemon"
32
command="/usr/sbin/daemon"
31
command_args="-rR 10 -H -P $pidfile -u %%WWWOWN%% \
33
command_args="-rR 10 -H -u %%WWWOWN%% \
34
		-P $pidfile -p $cpidfile \
32
		-o $ttrssd_log sh -c \
35
		-o $ttrssd_log sh -c \
33
		'$initdb_php --update-schema=force-yes; $phpupd'"
36
		'$initdb_php --update-schema=force-yes; \
37
			$phpupd;'"
38
39
stop_cmd="${name}_stop"
40
41
# daemon doesn't process signals if it lacks a child process.
42
# See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277959
43
ttrssd_stop() {
44
	local pid_daemon
45
	local pid_child
46
	local signal="TERM"
47
48
	pid_daemon=$(check_pidfile ${pidfile} ${command})
49
	pid_child=$(check_pidfile ${cpidfile} ${phpcli})
50
51
	if [ -n "$pid_daemon" ]; then
52
		echo "Stopping ${name}."
53
54
		if [ -z "${pid_child}" ]; then
55
		    signal="INT"
56
		fi
57
58
		kill -"$signal" "${pid_daemon}"
59
60
		wait_for_pids "${pid_daemon}" "${pid_child}"
61
	else
62
	    if [ -n "$pid_child" ]; then
63
		echo "${name} not running? (check ${cpidfile})."
64
	    else
65
		echo "${name} not running? (check ${pidfile})."
66
	    fi
67
	fi
68
}
34
69
35
run_rc_command "$1"
70
run_rc_command "$1"
36
- 

Return to bug 279803