From 7ee784a2bbf328767fbfdfa2bb8598ae7c32e083 Mon Sep 17 00:00:00 2001 From: Son Date: Wed, 15 May 2024 11:42:15 -0400 Subject: [PATCH] supervisord: fix entrypoint and sogod path --- entrypoint.sh | 17 +++++++++-------- supervisord.conf | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ac6d7f4..9ae01ef 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,15 +2,16 @@ . /usr/share/GNUstep/Makefiles/GNUstep.sh -#Solve libssl bug for Mail View -if [[ -z "${LD_PRELOAD}" ]]; then - LIBSSL_LOCATION=$(find / -type f -name "libssl.so.*" -print -quit);echo "LD_PRELOAD=$LIBSSL_LOCATION" >> /etc/default/sogo - echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo - export LD_PRELOAD=$LIBSSL_LOCATION +# Solve libssl bug for Mail View +if [ -z "$LD_PRELOAD" ]; then + LIBSSL_LOCATION=$(find / -type f -name "libssl.so.*" -print -quit) + echo "LD_PRELOAD=$LIBSSL_LOCATION" >> /etc/default/sogo + echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo + export LD_PRELOAD=$LIBSSL_LOCATION else - echo "LD_PRELOAD=$LD_PRELOAD" >> /etc/default/sogo - echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo - export LD_PRELOAD=$LD_PRELOAD + echo "LD_PRELOAD=$LD_PRELOAD" >> /etc/default/sogo + echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo + export LD_PRELOAD=$LD_PRELOAD fi # Set process UID and GID at runtime diff --git a/supervisord.conf b/supervisord.conf index c0a5c88..645fb01 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -5,7 +5,7 @@ logfile=/dev/null logfile_maxbytes=0 [program:sogo] -command=/bin/bash -c '/usr/sbin/sogod -WONoDetach YES -WOLogFile /var/log/sogo/sogo.log' +command=/bin/bash -c '/usr/local/sbin/sogod -WONoDetach YES -WOLogFile /var/log/sogo/sogo.log' user=sogo stdout_logfile=/dev/fd/1 stdout_logfile_maxbytes=0