diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /www-apps/tt-rss/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'www-apps/tt-rss/files')
-rw-r--r-- | www-apps/tt-rss/files/postinstall-en-with-daemon.txt | 19 | ||||
-rw-r--r-- | www-apps/tt-rss/files/postinstall-en.txt | 6 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.confd-r1 | 15 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.initd-r1 | 73 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.initd-r2 | 83 | ||||
-rw-r--r-- | www-apps/tt-rss/files/ttrssd.logrotated | 8 |
6 files changed, 204 insertions, 0 deletions
diff --git a/www-apps/tt-rss/files/postinstall-en-with-daemon.txt b/www-apps/tt-rss/files/postinstall-en-with-daemon.txt new file mode 100644 index 000000000000..7d269d7165f2 --- /dev/null +++ b/www-apps/tt-rss/files/postinstall-en-with-daemon.txt @@ -0,0 +1,19 @@ +Please read http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes + +Once you have configured TT-RSS, put the path to this instance into +the INSTANCE_DIRS variable in /etc/conf.d/ttrssd. Make sure that +the ttrssd user can access the path, and then start the update daemon +with + + /etc/init.d/ttrssd start + +to get your feeds updated. Add the daemon to your default runlevel, +so that it gets launched after a system restart: + + rc-update add ttrssd default + + +With the update to 1.7.0 the 'magpie' RSS parser has been removed. +That means TT-RSS will use the 'simplepie' parser. If you have been +using 'magpie' so far, the switch might cause lots of duplicate +articles - it's a one-time thing for each instance. diff --git a/www-apps/tt-rss/files/postinstall-en.txt b/www-apps/tt-rss/files/postinstall-en.txt new file mode 100644 index 000000000000..7b4b279e5be4 --- /dev/null +++ b/www-apps/tt-rss/files/postinstall-en.txt @@ -0,0 +1,6 @@ +Please read http://tt-rss.org/redmine/projects/tt-rss/wiki/InstallationNotes + +With the update to 1.7.0 the 'magpie' RSS parser has been removed. +That means TT-RSS will use the 'simplepie' parser. If you have been +using 'magpie' so far, the switch might cause lots of duplicate +articles - it's a one-time thing for each instance. diff --git a/www-apps/tt-rss/files/ttrssd.confd-r1 b/www-apps/tt-rss/files/ttrssd.confd-r1 new file mode 100644 index 000000000000..2987c4338fc5 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.confd-r1 @@ -0,0 +1,15 @@ +# Copyright 1999-2013 Gentoo Foundation +# # Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Path to TT-RSS instances which should have running update daemon. +# EXAMPLE: INSTANCE_DIRS="/some/webhost/htdocs/tt-rss /some/otherwebhost/htdocs/newsreader" +INSTANCE_DIRS="" + +# Path to log file. Remember to alter logrotate file if you change it here. +LOGFILE="/var/log/ttrssd.log" + +# User and group which run the update daemon. +# NOTE: you should really avoid running it as root. +TTRSSD_USER="ttrssd" +TTRSSD_GROUP="ttrssd" diff --git a/www-apps/tt-rss/files/ttrssd.initd-r1 b/www-apps/tt-rss/files/ttrssd.initd-r1 new file mode 100644 index 000000000000..28d430612550 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.initd-r1 @@ -0,0 +1,73 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need logger net + after postgres mysql +} + +LOGFILE=${LOGFILE:-"/var/log/ttrssd.log"} +TTRSSD_USER=${TTRSSD_USER:-"ttrssd"} +TTRSSD_GROUP=${TTRSSD_GROUP:-"ttrssd"} +INSTANCE_FOLDERS="cache lock feed-icons" + +checkconfig() { + local instance dir + + # check instances + if [ -z "${INSTANCE_DIRS}" ]; then + eerror "There is no defined instance directory in /etc/conf.d/ttrssd" + return 1 + fi + + # verify log file accessibility + if [ ! -e "${LOGFILE}" ]; then + touch "${LOGFILE}" || return 1 + fi + chown "${TTRSSD_USER}":"${TTRSSD_GROUP}" "${LOGFILE}" || return 1 + + # check instances for errors + for instance in ${INSTANCE_DIRS}; do + if [ ! -f "${instance}/update_daemon2.php" ]; then + eerror "\"${instance}\" does not contain update_daemon2.php script." + eerror "Please check your installation or the INSTANCE_DIRS variable." + return 1 + fi + + # FIXME: This should be done by webapp-config during install + for dir in ${INSTANCE_FOLDERS}; do + if [ -d "${instance}/${dir}" ]; then + chgrp -R "${TTRSSD_GROUP}" "${instance}/${dir}" || return 1 + chmod -R g+w "${instance}/${dir}" || return 1 + fi + done + done +} + +start () { + local instance + + checkconfig || return 1 + + for instance in ${INSTANCE_DIRS}; do + ebegin "Starting TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --start --user "${TTRSSD_USER}":"${TTRSSD_GROUP}" --background \ + --stdout "${LOGFILE}" --stderr "${LOGFILE}" \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + done +} + +stop() { + local instance + + for instance in ${INSTANCE_DIRS}; do + ebegin "Stopping TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --stop --retry 30 \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + rm -f ${instance}/lock/*.lock + done +} diff --git a/www-apps/tt-rss/files/ttrssd.initd-r2 b/www-apps/tt-rss/files/ttrssd.initd-r2 new file mode 100644 index 000000000000..3ebadb45b4c8 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.initd-r2 @@ -0,0 +1,83 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need logger net + after postgres mysql +} + +LOGFILE=${LOGFILE:-"/var/log/ttrssd.log"} +TTRSSD_USER=${TTRSSD_USER:-"ttrssd"} +TTRSSD_GROUP=${TTRSSD_GROUP:-"ttrssd"} +INSTANCE_FOLDERS="cache lock feed-icons" +BASE_PID="/run/ttrssd" + +checkconfig() { + local instance instancepidname dir + + # check instances + if [ -z "${INSTANCE_DIRS}" ]; then + eerror "There is no defined instance directory in /etc/conf.d/ttrssd" + return 1 + fi + + # verify log file accessibility + if [ ! -e "${LOGFILE}" ]; then + touch "${LOGFILE}" || return 1 + fi + chown "${TTRSSD_USER}":"${TTRSSD_GROUP}" "${LOGFILE}" || return 1 + + mkdir -p "${BASE_PID}" + + # check instances for errors + for instance in ${INSTANCE_DIRS}; do + instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g') + + if [ ! -f "${instance}/update_daemon2.php" ]; then + eerror "\"${instance}\" does not contain update_daemon2.php script." + eerror "Please check your installation or the INSTANCE_DIRS variable." + return 1 + fi + + # NOTE: This can't be done by webapp-config if we want runtime configurable TTRSSD_GROUP + for dir in ${INSTANCE_FOLDERS}; do + if [ -d "${instance}/${dir}" ]; then + chown -R ":${TTRSSD_GROUP}" "${instance}/${dir}" || return 1 + chmod -R g+w "${instance}/${dir}" || return 1 + fi + done + done +} + +start () { + local instance instancepidname + + checkconfig || return 1 + + for instance in ${INSTANCE_DIRS}; do + instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g') + mypid="${BASE_PID}/${instancepidname}" + ebegin "Starting TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --start --user "${TTRSSD_USER}":"${TTRSSD_GROUP}" --background \ + --stdout "${LOGFILE}" --stderr "${LOGFILE}" \ + --make-pidfile --pidfile "${mypid}" \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + done +} + +stop() { + local instance instancepidname + + for instance in ${INSTANCE_DIRS}; do + instancepidname=$(echo "${instance}.pid" | sed -e 's|/||' -e 's|/|--|g') + mypid="${BASE_PID}/${instancepidname}" + ebegin "Stopping TT-RSS update daemon in \"${instance}\"" + start-stop-daemon --stop \ + --pidfile "${mypid}" \ + --exec /usr/bin/php -- -f "${instance}/update_daemon2.php" + eend $? + rm -f ${instance}/lock/*.lock + done +} diff --git a/www-apps/tt-rss/files/ttrssd.logrotated b/www-apps/tt-rss/files/ttrssd.logrotated new file mode 100644 index 000000000000..9616a98c3029 --- /dev/null +++ b/www-apps/tt-rss/files/ttrssd.logrotated @@ -0,0 +1,8 @@ +/var/log/ttrssd.log { + daily + missingok + notifempty + postrotate + /etc/init.d/ttrssd restart > /dev/null + endscript +} |