2024-12-30 22:50:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2025-01-02 16:54:24 +01:00
|
|
|
(
|
|
|
|
cat <<EOF
|
|
|
|
defaults
|
|
|
|
tls $SMTP_TLS
|
|
|
|
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
|
|
|
syslog on
|
|
|
|
|
|
|
|
account account
|
|
|
|
host $SMTP_HOST
|
|
|
|
port $SMTP_PORT
|
|
|
|
auth $SMTP_AUTH
|
|
|
|
from $LW_MAIL_FROM
|
|
|
|
EOF
|
|
|
|
if [ "$SMTP_AUTH" = "on" ]; then
|
|
|
|
echo "user $SMTP_USER"
|
|
|
|
echo 'passwordeval "cat /run/secrets/smtp_password"'
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
account default : account
|
|
|
|
aliases /etc/aliases
|
|
|
|
EOF
|
|
|
|
) > /etc/msmtprc
|
|
|
|
|
2024-12-30 22:50:05 +01:00
|
|
|
socat -u \
|
|
|
|
UNIX-LISTEN:/dev/log,reuseaddr,mode=666,fork \
|
|
|
|
SYSTEM:"(sed -z 's/$/\\\\n/'; /bin/echo)" \
|
|
|
|
&
|
|
|
|
|
2024-12-31 12:13:52 +01:00
|
|
|
perl /opt/lwb5/scripts/control.pl --start
|
2024-12-30 22:50:05 +01:00
|
|
|
|
|
|
|
: "${APACHE_CONFDIR:=/etc/apache2}"
|
|
|
|
: "${APACHE_RUN_DIR:=/run/apache2}"
|
|
|
|
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
|
|
|
|
: "${APACHE_LOG_DIR:=/var/log/apache2}"
|
|
|
|
: "${APACHE_RUN_USER:=www-data}"
|
|
|
|
: "${APACHE_RUN_GROUP:=www-data}"
|
|
|
|
rm -f "$APACHE_PID_FILE"
|
|
|
|
|
|
|
|
export APACHE_CONFDIR APACHE_RUN_DIR APACHE_PID_FILE \
|
|
|
|
APACHE_LOG_DIR APACHE_RUN_USER APACHE_RUN_GROUP
|
|
|
|
exec /usr/sbin/apache2 -DFOREGROUND "$@"
|