1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diagramsnet_ynh.git synced 2024-09-03 18:26:33 +02:00

Merge pull request #7 from YunoHost-Apps/remove_third_parties

Remove third parties
This commit is contained in:
Gofannon 2020-04-05 13:28:34 +02:00 committed by GitHub
commit 56e301c8f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 15 deletions

View file

@ -2,8 +2,13 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
## [12.9.7~ynh1] - 2020-04-05
### Added
- Disable third party website integration with Dropbox, Google, Trello, etc. [See this explanation in french](https://shelter.moe/@Neil/103928506546498078)
### Changed
- upgrade source to upstream <https://github.com/jgraph/drawio/releases/tag/v12.9.7>

View file

@ -26,7 +26,7 @@ diagrams.net lets you create a wide range of diagrams, from simple tree and flow
## YunoHost specific features
Later, it might be interresting to see how to integrate this app with NextCloud or DokuWiki
* Disable third party website integration with Dropbox, Google, Trello, etc
### Supported architectures

View file

@ -66,6 +66,16 @@ ynh_script_progression --message="Configuring nginx web server..." --weight=15
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# REMOVE CALLS TO THIRD PARTY WEBSITES
#=================================================
# Add "offline" parameter in index.html
# See https://desk.draw.io/support/solutions/articles/16000042546-what-url-parameters-are-supported-
# and https://shelter.moe/@Neil/103928506546498078 [French]
sed_pattern="s/var params = window.location.search.slice(1).split('&');/&\n\t\t\tparams.push(\"offline=1\");/g"
sed -i "$sed_pattern" "$final_path/src/main/webapp/index.html"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -71,22 +71,17 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." -
ynh_add_nginx_config
#=================================================
# SETUP LOGROTATE
# REMOVE CALLS TO THIRD PARTY WEBSITES
#=================================================
#ynh_script_progression --message="Upgrading logrotate configuration..." --time --weight=1
# Use logrotate to manage app-specific logfile(s)
#ynh_use_logrotate --non-append
#=================================================
# GENERIC FINALIZATION
#=================================================
# UPGRADE FAIL2BAN
#=================================================
#ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1
# Create a dedicated fail2ban config
#ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
# Add "offline" parameter in index.html
# See https://desk.draw.io/support/solutions/articles/16000042546-what-url-parameters-are-supported-
# and https://shelter.moe/@Neil/103928506546498078 [French]
sed_pattern="s/var params = window.location.search.slice(1).split('&');/&\n\t\t\tparams.push(\"offline=1\");/g"
sed -i "$sed_pattern" "$final_path/src/main/webapp/index.html"
fi
#=================================================
# SECURE FILES AND DIRECTORIES