From 15c636fdf40dc3d0b39664d924699370e7a52a97 Mon Sep 17 00:00:00 2001 From: tuutti Date: Tue, 23 Apr 2024 05:24:35 +0300 Subject: [PATCH] Keep syslog compatible with current helfi_api_base module --- local/drupal/entrypoints/15-syslog.sh | 11 +++++++++++ openshift/drupal/files/entrypoints/15-syslog.sh | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 local/drupal/entrypoints/15-syslog.sh create mode 100644 openshift/drupal/files/entrypoints/15-syslog.sh diff --git a/local/drupal/entrypoints/15-syslog.sh b/local/drupal/entrypoints/15-syslog.sh new file mode 100644 index 0000000..80b90a2 --- /dev/null +++ b/local/drupal/entrypoints/15-syslog.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +cd /app + +# @todo Remove this once all projects use monolog. +if ! composer show drupal/monolog -q 2>/dev/null; then + sudo touch /tmp/drupal.log && sudo chmod a+rw /tmp/drupal.log + tail -f /tmp/drupal.log & +else + echo "Found drupal/monolog. Skipping logger entrypoint ..." +fi diff --git a/openshift/drupal/files/entrypoints/15-syslog.sh b/openshift/drupal/files/entrypoints/15-syslog.sh new file mode 100644 index 0000000..0120eea --- /dev/null +++ b/openshift/drupal/files/entrypoints/15-syslog.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +cd /var/www/html + +# @todo Remove this once all projects use monolog. +if ! composer show drupal/monolog -q 2>/dev/null; then + sudo touch /tmp/drupal.log && sudo chmod a+rw /tmp/drupal.log + tail -f /tmp/drupal.log & +else + echo "Found drupal/monolog. Skipping logger entrypoint ..." +fi +