33# T&M Hansson IT AB © - 2019, https://www.hanssonit.se/
44
55true
6- SCRIPT_NAME=" OnlyOffice (Docker)"
7- SCRIPT_EXPLAINER=" This script will install the OnlyOffice Document Server bundled with Docker"
6+ SCRIPT_NAME=" EuroOffice (Docker)"
7+ SCRIPT_EXPLAINER=" This script will install the EuroOffice Document Server bundled with Docker"
88# shellcheck source=lib.sh
99source /var/scripts/fetch_lib.sh
1010
@@ -17,18 +17,23 @@ debug_mode
1717# Check if root
1818root_check
1919
20- # Check if collabora is already installed
21- if ! does_this_docker_exist ' onlyoffice/documentserver'
20+ # Check if EuroOffice (or the legacy OnlyOffice) is already installed
21+ if ! does_this_docker_exist ' ghcr.io/euro-office/documentserver ' && ! does_this_docker_exist ' onlyoffice/documentserver'
2222then
2323 # Ask for installing
2424 install_popup " $SCRIPT_NAME "
2525else
2626 # Ask for removal or reinstallation
2727 reinstall_remove_menu " $SCRIPT_NAME "
28- # Removal
29- remove_onlyoffice_docker
30- # Remove config.php value set when install was successful
28+ # Removal (also cleans up a legacy OnlyOffice install)
29+ remove_eurooffice_docker
30+ # Remove config.php values set when install was successful
3131 nextcloud_occ config:system:delete allow_local_remote_servers
32+ nextcloud_occ config:system:delete eurooffice
33+ nextcloud_occ config:system:delete eurooffice jwt_secret
34+ nextcloud_occ config:app:delete eurooffice jwt_secret
35+ nextcloud_occ config:system:delete eurooffice jwt_header
36+ # Remove legacy OnlyOffice config values if they still exist
3237 nextcloud_occ config:system:delete onlyoffice
3338 nextcloud_occ config:system:delete onlyoffice jwt_secret
3439 nextcloud_occ config:app:delete onlyoffice jwt_secret
@@ -51,7 +56,7 @@ remove_all_office_apps
5156if [ " $( apache2ctl -M | grep evasive) " != " " ]
5257then
5358 msg_box " We noticed that 'mod_evasive' is installed which is the DDOS protection for webservices. \
54- It has compatibility issues with OnlyOffice and you can now choose to disable it."
59+ It has compatibility issues with EuroOffice and you can now choose to disable it."
5560 if ! yesno_box_yes " Do you want to disable DDOS protection?"
5661 then
5762 print_text_in_color " $ICyan " " Keeping mod_evasive active."
@@ -63,8 +68,8 @@ It has compatibility issues with OnlyOffice and you can now choose to disable it
6368 fi
6469fi
6570
66- # Ask for the domain for OnlyOffice
67- SUBDOMAIN=$( input_box_flow " OnlyOffice subdomain e.g: office.yourdomain.com
71+ # Ask for the domain for EuroOffice
72+ SUBDOMAIN=$( input_box_flow " EuroOffice subdomain e.g: office.yourdomain.com
6873NOTE: This domain must be different than your Nextcloud domain. \
6974They can however be hosted on the same server, but would require separate DNS entries." )
7075
@@ -113,8 +118,8 @@ Please install Nextcloud and make sure your domain is reachable, or activate TLS
113118on your domain to be able to run this script.
114119If you use the Nextcloud VM you can use the Let's Encrypt script to get TLS and activate your Nextcloud domain.
115120When TLS is activated, run these commands from your CLI:
116- sudo curl -sLO $APP /onlyoffice_docker .sh
117- sudo bash onlyoffice_docker .sh"
121+ sudo curl -sLO $APP /eurooffice_docker .sh
122+ sudo bash eurooffice_docker .sh"
118123 exit 1
119124fi
120125
@@ -127,20 +132,20 @@ check_open_port 80 "$SUBDOMAIN"
127132check_open_port 443 " $SUBDOMAIN "
128133
129134# Test RAM size (2GB min) + CPUs (min 2)
130- ram_check 2 OnlyOffice
131- cpu_check 2 OnlyOffice
135+ ram_check 2 EuroOffice
136+ cpu_check 2 EuroOffice
132137
133138# Check if Nextcloud is installed with TLS
134- check_nextcloud_https " OnlyOffice (Docker)"
139+ check_nextcloud_https " EuroOffice (Docker)"
135140
136141# Install Docker
137142install_docker
138143
139- ONLYOFFICE_SECRET =" $( gen_passwd " $SHUF " " a-zA-Z0-9" ) "
144+ EUROOFFICE_SECRET =" $( gen_passwd " $SHUF " " a-zA-Z0-9" ) "
140145
141- # Install Onlyoffice docker
142- docker pull onlyoffice /documentserver:latest
143- docker run -i -t -d -p 127.0.0.3:9090:80 -e JWT_ENABLED=true -e JWT_HEADER=AuthorizationJwt -e JWT_SECRET=" $ONLYOFFICE_SECRET " --restart always --name onlyoffice onlyoffice /documentserver
146+ # Install EuroOffice docker
147+ docker pull ghcr.io/euro-office /documentserver:latest
148+ docker run -i -t -d -p 127.0.0.3:9090:80 -e JWT_ENABLED=true -e JWT_HEADER=AuthorizationJwt -e JWT_SECRET=" $EUROOFFICE_SECRET " --restart always --name eurooffice ghcr.io/euro-office /documentserver
144149
145150# Install apache2
146151install_if_not apache2
164169 rm -f " $HTTPS_CONF "
165170fi
166171
167- # Create Vhost for OnlyOffice Docker online in Apache2
172+ # Create Vhost for EuroOffice Docker online in Apache2
168173if [ ! -f " $HTTPS_CONF " ];
169174then
170175 cat << HTTPS_CREATE > "$HTTPS_CONF "
180185 SSLEngine on
181186 SSLCompression off
182187 SSLProtocol -all +TLSv1.2 $TLS13
183- SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
188+ SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
184189 SSLHonorCipherOrder off
185190 SSLSessionTickets off
186191 ServerSignature off
@@ -246,31 +251,31 @@ then
246251 print_text_in_color " $IGreen " " Certs are generated!"
247252 a2ensite " $SUBDOMAIN .conf"
248253 restart_webserver
249- # Install OnlyOffice
250- install_and_enable_app onlyoffice
254+ # Install EuroOffice
255+ install_and_enable_app eurooffice
251256else
252- last_fail_tls " $SCRIPTS " /apps/onlyoffice .sh
257+ last_fail_tls " $SCRIPTS " /apps/eurooffice_docker .sh
253258 exit 1
254259fi
255260
256- # Set config for OnlyOffice
257- if [ -d " $NC_APPS_PATH " /onlyoffice ]
261+ # Set config for EuroOffice
262+ if [ -d " $NC_APPS_PATH " /eurooffice ]
258263then
259- nextcloud_occ config:app:set onlyoffice DocumentServerUrl --value=https://" $SUBDOMAIN /"
264+ nextcloud_occ config:app:set eurooffice DocumentServerUrl --value=https://" $SUBDOMAIN /"
260265 chown -R www-data:www-data " $NC_APPS_PATH "
261266 # Appending the new domain to trusted domains
262267 add_to_trusted_domains " $SUBDOMAIN "
263268 # Allow remote servers with local addresses e.g. in federated shares, webcal services and more
264269 nextcloud_occ config:system:set allow_local_remote_servers --value=" true"
265- nextcloud_occ config:system:set onlyoffice jwt_secret --value=" $ONLYOFFICE_SECRET "
266- nextcloud_occ config:app:set onlyoffice jwt_secret --value=" $ONLYOFFICE_SECRET "
267- nextcloud_occ config:system:set onlyoffice jwt_header --value=" AuthorizationJwt"
270+ nextcloud_occ config:system:set eurooffice jwt_secret --value=" $EUROOFFICE_SECRET "
271+ nextcloud_occ config:app:set eurooffice jwt_secret --value=" $EUROOFFICE_SECRET "
272+ nextcloud_occ config:system:set eurooffice jwt_header --value=" AuthorizationJwt"
268273 # Add prune command
269274 add_dockerprune
270275 # Restart Docker
271276 print_text_in_color " $ICyan " " Restarting Docker..."
272- docker restart onlyoffice
273- msg_box " OnlyOffice Docker is now successfully installed.
277+ docker restart eurooffice
278+ msg_box " EuroOffice Docker is now successfully installed.
274279Please be aware that the container is currently starting which can take a few minutes."
275280fi
276281
0 commit comments