2023-05-01 18:37:33 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2024-12-17 10:39:01 -06:00
|
|
|
# Wait until the apache container is ready
|
|
|
|
|
while ! nc -z "$APACHE_HOST" "$APACHE_PORT"; do
|
2025-01-30 11:36:12 +01:00
|
|
|
echo "Waiting for $APACHE_HOST to become available..."
|
2024-12-17 10:39:01 -06:00
|
|
|
sleep 15
|
2024-12-09 19:26:12 -06:00
|
|
|
done
|
2023-05-01 18:37:33 +02:00
|
|
|
|
|
|
|
|
if [ -n "$NEXTCLOUD_EXEC_COMMANDS" ]; then
|
|
|
|
|
echo "#!/bin/bash" > /tmp/nextcloud-exec-commands
|
|
|
|
|
echo "$NEXTCLOUD_EXEC_COMMANDS" >> /tmp/nextcloud-exec-commands
|
|
|
|
|
if ! grep "one-click-instance" /tmp/nextcloud-exec-commands; then
|
|
|
|
|
bash /tmp/nextcloud-exec-commands
|
|
|
|
|
rm /tmp/nextcloud-exec-commands
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
# Collabora must work also if using manual-install
|
|
|
|
|
if [ "$COLLABORA_ENABLED" = yes ]; then
|
2023-08-23 16:39:20 +02:00
|
|
|
echo "Activating Collabora config..."
|
2023-05-01 18:37:33 +02:00
|
|
|
php /var/www/html/occ richdocuments:activate-config
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
2025-06-19 14:47:11 +02:00
|
|
|
signal_handler() {
|
|
|
|
|
exit 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
trap signal_handler SIGINT SIGTERM
|
|
|
|
|
|
|
|
|
|
sleep inf &
|
|
|
|
|
wait $!
|