Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 764950 Details for
Bug 833206
www-apps/tt-rss openrc service fails to run with dash
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
ttrssd.initd-r4
ttrssd.initd-r4 (text/plain), 2.85 KB, created by
Anna Vyalkova
on 2022-02-12 20:34:36 UTC
(
hide
)
Description:
ttrssd.initd-r4
Filename:
MIME Type:
Creator:
Anna Vyalkova
Created:
2022-02-12 20:34:36 UTC
Size:
2.85 KB
patch
obsolete
>#!/sbin/openrc-run ># Copyright 1999-2022 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 > >command="/usr/bin/php" > >depend() { > need net > after postgresql mysql >} > >PID_DIR="/run/ttrssd" >LOG_DIR=${LOG_DIR:-"/var/log/ttrssd"} >TTRSSD_USER=${TTRSSD_USER:-"ttrssd"} > >list_instance_dirs() { > if [ -z "${INSTANCE_DIRS}" ]; then > cut -d" " -f4 /var/db/webapps/tt-rss/*/installs 2>/dev/null > else > printf "%s\n" ${INSTANCE_DIRS} > fi >} > >instance_dir_to_name() { > local name > > name=${1#/} > printf %s "${name}" | awk '{ > gsub("/", "--"); > print $0; > }' >} > >start_pre() { > mkdir -p "${PID_DIR}" "${LOG_DIR}" || return 1 > chown "${TTRSSD_USER}":ttrssd "${LOG_DIR}" || return 1 >} > >start() { > local instance_dir instance_name ret=1 > > IFS=$(printf "\n" "") > for instance_dir in $(list_instance_dirs); do > if [ -d "${instance_dir}" ]; then > if [ ! -f "${instance_dir}"/update_daemon2.php ]; then > ewarn "TT-RSS instance in ${instance_dir} has no update_daemon2.php script" > elif [ ! -f "${instance_dir}"/config.php ]; then > eerror "TT-RSS instance in ${instance_dir} is not configured" > else > instance_name=$(instance_dir_to_name "${instance_dir}") > ebegin "Starting TT-RSS update daemon in ${instance_dir}" > start-stop-daemon --start --user "${TTRSSD_USER}":ttrssd \ > --background --wait 2000 \ > --stdout "${LOG_DIR}/${instance_name}.log" \ > --stderr "${LOG_DIR}/${instance_name}.log" \ > --make-pidfile --pidfile "${PID_DIR}/${instance_name}.pid" \ > --exec /usr/bin/php -- -f "${instance_dir}"/update_daemon2.php \ > -- ${TTRSSD_OPTS} > eend $? && ret=0 > fi > else > eerror "TT-RSS instance in ${instance_dir} is missing" > fi > done > unset IFS > > # Succeed if at least one started. > return ${ret} >} > >stop() { > local instance_dir instance_name > > IFS=$(printf "\n" "") > for instance_dir in $(list_instance_dirs); do > instance_name=$(instance_dir_to_name "${instance_dir}") > > [ -f "${PID_DIR}/${instance_name}.pid" ] || > [ -f "${instance_dir}"/update_daemon2.php ] || > continue > > ebegin "Stopping TT-RSS update daemon in ${instance_dir}" > start-stop-daemon --stop --retry 5 --pidfile "${PID_DIR}/${instance_name}.pid" \ > --exec /usr/bin/php -- -f "${instance_dir}"/update_daemon2.php \ > -- ${TTRSSD_OPTS} > eend $? > > rm -f "${instance_dir}"/lock/*.lock > done > unset IFS > > # Always succeed. > return 0 >} > >status() { > local instance_dir instance_name pid > > IFS=$(printf "\n" "") > for instance_dir in $(list_instance_dirs); do > instance_name=$(instance_dir_to_name "${instance_dir}") > > [ -f "${PID_DIR}/${instance_name}.pid" ] || > [ -f "${instance_dir}"/update_daemon2.php ] || > continue > > pid=$(cat "${PID_DIR}/${instance_name}.pid") > if kill -0 "${pid}" >/dev/null 2>&1; then > # At least one instance is running > return 0 > fi > done > unset IFS > > # No instances are running > return 1 >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 833206
:
764950
|
765104