mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 12:03:02 -04:00
Invidious hard depends on PostgreSQL, and fails to start if PostgreSQL hasn't already started. So it will fail to start if started at boot (rc-update add invidious default). See: https://bugs.gentoo.org/916051 Using 'postgresql' as 'use' in the 'depend' function of the www-apps/invidious/files/invidious.initd file fixes this behaviour. Signed-off-by: Benoît Dufour <benoit.dufour@mail.com>
28 lines
853 B
Plaintext
28 lines
853 B
Plaintext
#!/sbin/openrc-run
|
|
# Copyright 2022 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
: ${INVIDIOUS_CONFIG_FILE:=/etc/invidious/config.yml}
|
|
|
|
name="Invidious"
|
|
description="An alternative YouTube front-end"
|
|
command="/usr/bin/invidious"
|
|
command_user="invidious:invidious"
|
|
command_background=1
|
|
pidfile="/run/invidious.pid"
|
|
output_log="/var/log/invidious.log"
|
|
error_log="${output_log}"
|
|
|
|
# Invidious hard depends on PostgreSQL, and fails to start if PostgreSQL hasn't already started.
|
|
# So it will fail to start if started at boot (rc-update add invidious default).
|
|
# See: https://bugs.gentoo.org/916051
|
|
# Using 'postgresql' as 'use' in the 'depend' function fixes this behaviour.
|
|
depend() {
|
|
use logger net postgresql
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath -fo invidious:invidious /var/log/invidious.log
|
|
export INVIDIOUS_CONFIG_FILE
|
|
}
|