Skip to content

Commit

Permalink
Improve onlyoffice installation in local envs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean28518 committed Apr 26, 2024
1 parent 7fb8f0e commit d932e3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/lac/unix/unix_scripts/onlyoffice/remove_onlyoffice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions src/lac/unix/unix_scripts/onlyoffice/setup_onlyoffice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d932e3f

Please sign in to comment.