summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-04-10 23:07:45 +0200
committerThomas Deutschmann <whissi@gentoo.org>2021-04-10 23:08:27 +0200
commitf6c4917cdb720ec8495b12741d0c3af2caf9a3ff (patch)
treefa40eccb4a6fe39898a83c80f2b4f26c8b2b297c /www-apps/nextcloud-notify_push/files
parentdev-python/python-mpd: Bump to 3.0.4 (diff)
downloadgentoo-f6c4917cdb720ec8495b12741d0c3af2caf9a3ff.tar.gz
gentoo-f6c4917cdb720ec8495b12741d0c3af2caf9a3ff.tar.bz2
gentoo-f6c4917cdb720ec8495b12741d0c3af2caf9a3ff.zip
www-apps/nextcloud-notify_push: handle error logs in runscript
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'www-apps/nextcloud-notify_push/files')
-rw-r--r--www-apps/nextcloud-notify_push/files/nextcloud-notify_push.confd2
-rw-r--r--www-apps/nextcloud-notify_push/files/nextcloud-notify_push.init12
2 files changed, 8 insertions, 6 deletions
diff --git a/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.confd b/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.confd
index 7653cf41b78c..ccb2c5b5c766 100644
--- a/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.confd
+++ b/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.confd
@@ -74,7 +74,7 @@ SOCKET_PATH="/run/${SVCNAME}/notify_push.socket"
# By default, a background service in OpenRC will produce no output.
# Uncomment the following option to log output to a file.
-#output_log="/var/log/${SVCNAME}.log"
+#LOGFILE="/var/log/${SVCNAME}.log"
# Configure service dependencies
# notify_push needs to connect to same mysql and redis instance
diff --git a/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.init b/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.init
index b5469591ca76..1a3d9c130349 100644
--- a/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.init
+++ b/www-apps/nextcloud-notify_push/files/nextcloud-notify_push.init
@@ -83,6 +83,13 @@ start_pre() {
export LOG
fi
+ # shellcheck disable=SC2154
+ if [ -n "${LOGFILE}" ] ; then
+ checkpath -q -f -o ${NOTIFY_PUSH_USER}:adm -m 0644 "${LOGFILE}"
+ output_log="${LOGFILE}"
+ error_log="${LOGFILE}"
+ fi
+
if [ -n "${METRICS_PORT}" ] ; then
export METRICS_PORT
fi
@@ -93,11 +100,6 @@ start_pre() {
export METRICS_SOCKET_PATH
fi
- # shellcheck disable=SC2154
- if [ -n "${output_log}" ] ; then
- checkpath -q -f -o ${NOTIFY_PUSH_USER}:adm -m 0644 "${output_log}"
- fi
-
if [ -n "${has_errors}" ] ; then
eerror ""
eerror "Either set the variable above or specify NOTIFY_PUSH_NEXTCLOUD_CONFIGFILE"