From d932e3f0c62f3b0afafa20f45cf0e5bf7419fe2b Mon Sep 17 00:00:00 2001 From: Jean28518 Date: Fri, 26 Apr 2024 22:36:12 +0200 Subject: [PATCH] Improve onlyoffice installation in local envs --- .../unix_scripts/onlyoffice/remove_onlyoffice.sh | 2 +- .../unix/unix_scripts/onlyoffice/setup_onlyoffice.sh | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lac/unix/unix_scripts/onlyoffice/remove_onlyoffice.sh b/src/lac/unix/unix_scripts/onlyoffice/remove_onlyoffice.sh index ab33a79..ff2f184 100644 --- a/src/lac/unix/unix_scripts/onlyoffice/remove_onlyoffice.sh +++ b/src/lac/unix/unix_scripts/onlyoffice/remove_onlyoffice.sh @@ -2,7 +2,7 @@ # Needs the following variables: # DOMAIN -python3 ../remove_caddy_service.py office.$DOMAIN +python3 /usr/share/linux-arbeitsplatz/unix/unix_scripts/remove_caddy_service.py office.$DOMAIN # If nextcloud is installed, remove the onlyoffice app if [ -d "/var/www/nextcloud" ]; then diff --git a/src/lac/unix/unix_scripts/onlyoffice/setup_onlyoffice.sh b/src/lac/unix/unix_scripts/onlyoffice/setup_onlyoffice.sh index 138a2ba..b07d3e6 100644 --- a/src/lac/unix/unix_scripts/onlyoffice/setup_onlyoffice.sh +++ b/src/lac/unix/unix_scripts/onlyoffice/setup_onlyoffice.sh @@ -7,16 +7,14 @@ mkdir -p /root/onlyoffice echo "docker pull onlyoffice/documentserver:latest -docker run -i -t -d -p 10923:80 --restart=unless-stopped --name onlyoffice -e JWT_ENABLED='true' -e JWT_SECRET='$ADMIN_PASSWORD' onlyoffice/documentserver:latest --add-host cloud.$DOMAIN:$IP" > /root/onlyoffice/run.sh +docker run -i -t -d -p 10923:80 --restart=unless-stopped --name onlyoffice -e JWT_ENABLED='true' -e JWT_SECRET='$ADMIN_PASSWORD' --add-host \"cloud.$DOMAIN:$IP\" onlyoffice/documentserver:latest" > /root/onlyoffice/run.sh if [ $DOMAIN = "int.de" ] ; then - echo """ - docker exec onlyoffice sed -i 's/"rejectUnauthorized": true/"rejectUnauthorized": false/g' /etc/onlyoffice/documentserver/default.json - docker restart onlyoffice - # Add the ip cloud.$DOMAIN to /etc/hosts in docker container - docker exec onlyoffice bash -c \"echo '$IP cloud.$DOMAIN' >> /etc/hosts\" - """ >> /root/onlyoffice/run.sh + echo " +docker exec onlyoffice sed -i 's/\"rejectUnauthorized\": true/\"rejectUnauthorized\": false/g' /etc/onlyoffice/documentserver/default.json +docker restart onlyoffice +" >> /root/onlyoffice/run.sh fi bash /root/onlyoffice/run.sh