mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
allow to define nextcloud_exec_commands in containers definition
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
3e04dd5c2e
commit
e4de4dcb67
10 changed files with 77 additions and 17 deletions
|
|
@ -241,7 +241,7 @@ RUN set -ex; \
|
|||
chmod +x /cron.sh && \
|
||||
chmod +x /notify.sh && \
|
||||
chmod +x /notify-all.sh && \
|
||||
chmod +x /activate-collabora.sh && \
|
||||
chmod +x /run-exec-commands.sh && \
|
||||
chmod +x /healthcheck.sh
|
||||
|
||||
RUN set -ex; \
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$COLLABORA_ENABLED" != yes ]; then
|
||||
# Basically sleep for forever if collabora is not enabled
|
||||
sleep inf
|
||||
fi
|
||||
while ! nc -z "$NC_DOMAIN" 443; do
|
||||
sleep 5
|
||||
done
|
||||
sleep 10
|
||||
echo "Activating collabora config..."
|
||||
php /var/www/html/occ richdocuments:activate-config
|
||||
sleep inf
|
||||
23
Containers/nextcloud/run-exec-commands.sh
Normal file
23
Containers/nextcloud/run-exec-commands.sh
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
while ! nc -z "$NC_DOMAIN" 443; do
|
||||
sleep 5
|
||||
done
|
||||
sleep 10
|
||||
|
||||
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
|
||||
echo "Activating collabora config..."
|
||||
php /var/www/html/occ richdocuments:activate-config
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep inf
|
||||
|
|
@ -33,10 +33,10 @@ stderr_logfile_maxbytes=0
|
|||
command=/var/www/html/custom_apps/notify_push/bin/%(ENV_CPU_ARCH)s/notify_push /var/www/html/config/config.php --port 7867 --redis-url redis://:%(ENV_REDIS_HOST_PASSWORD)s@%(ENV_REDIS_HOST)s
|
||||
user=www-data
|
||||
|
||||
[program:activate-collabora]
|
||||
[program:run-exec-commands]
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
command=/activate-collabora.sh
|
||||
command=/run-exec-commands.sh
|
||||
user=www-data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue