mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-30 07:20:09 +00:00
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/cd05ca56-d0e8-4260-988b-a7cc0747beff Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
34 lines
857 B
Bash
34 lines
857 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$INSTANCE_ID" ]; then
|
|
echo "You need to provide an instance id."
|
|
exit 1
|
|
fi
|
|
|
|
echo "$INSTANCE_ID" > /var/www/domaincheck/index.html
|
|
|
|
if [ -z "$APACHE_PORT" ]; then
|
|
export APACHE_PORT="443"
|
|
fi
|
|
|
|
CONF_FILE="$(sed "s|ipv6-placeholder|\[::\]:$APACHE_PORT|" /lighttpd.conf)"
|
|
echo "$CONF_FILE" > /etc/lighttpd/lighttpd.conf
|
|
|
|
# Enable verbose debug logging when AIO_LOG_LEVEL is set to debug
|
|
if [ "${AIO_LOG_LEVEL:-warning}" = "debug" ]; then
|
|
{
|
|
echo 'debug.log-request-handling = "enable"'
|
|
echo 'debug.log-response-header = "enable"'
|
|
echo 'debug.log-request-header = "enable"'
|
|
echo 'debug.log-condition-handling = "enable"'
|
|
} >> /etc/lighttpd/lighttpd.conf
|
|
fi
|
|
|
|
# Check config file
|
|
lighttpd -tt -f /etc/lighttpd/lighttpd.conf
|
|
|
|
# Run server
|
|
lighttpd -D -f /etc/lighttpd/lighttpd.conf
|
|
|
|
exec "$@"
|