diff options
-rw-r--r-- | www-apps/nextcloud-notify_push/files/nextcloud-notify_push.confd | 2 | ||||
-rw-r--r-- | www-apps/nextcloud-notify_push/files/nextcloud-notify_push.init | 12 |
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" |