From 910d0f696211f918bb923d43322d9f0b58d6dd67 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 30 Jul 2017 21:33:17 +0200 Subject: [PATCH] Some clean-up --- README.md | 5 +++++ check_process | 4 ++-- conf/nginx.conf | 28 ++-------------------------- scripts/install | 17 ++--------------- 4 files changed, 11 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 1d28281..4b7a0d9 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,14 @@ Cryptad for Yunohost https://cryptpad.fr/ ## Known limitations / Limitations connues +- Installation possible only on a domain root (Cryptpad limitation) - Can't login via SSO (due to this [Cryptpad limitation](https://github.com/xwiki-labs/cryptpad/issues/116)) + ## Links / Liens - Package URL/URL du Paquet: https://github.com/YunoHost-Apps/cryptpad_ynh - Official Website/Site Officiel: https://cryptpad.fr/ - Github: https://github.com/xwiki-labs/cryptpad +- Package status: + - [Last weekly report](https://forum.yunohost.org/t/rapport-hebdomadaire-dintegration-continue/2297) + - [Last continuous integration test](https://ci-apps.yunohost.org/jenkins/job/cryptpad%20%28Community%29/lastBuild/consoleFull) diff --git a/check_process b/check_process index 40ea413..266c694 100644 --- a/check_process +++ b/check_process @@ -13,8 +13,8 @@ setup_public=1 upgrade=1 backup_restore=1 - multi_instance=1 - incorrect_path=1 + multi_instance=0 + incorrect_path=0 port_already_use=1 change_url=0 ;;; Levels diff --git a/conf/nginx.conf b/conf/nginx.conf index 4855df4..9bbef79 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,3 @@ -root __FINALPATH__; -index index.html; - location / { proxy_pass http://localhost:__PORT__/; add_header X-Frame-Options SAMEORIGIN; @@ -9,27 +6,8 @@ location / { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; -} -location = /cryptpad_websocket { - proxy_pass http://localhost:__PORT__; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # WebSocket support (nginx 1.4) - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection upgrade; -} - - -#location = /api/config { -# default_type text/javascript; -# rewrite ^.*$ /customize/api/config break; -#} - -if ($uri = /pad/inner.html) { - set $scriptSrc "'self' 'unsafe-eval' 'unsafe-inline'"; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } ## TODO fix in the code so that we don't need this @@ -38,5 +16,3 @@ location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard) } try_files $uri $uri/index.html; -# Include SSOWAT user panel. -include conf.d/yunohost_panel.conf.inc; diff --git a/scripts/install b/scripts/install index 2dfa949..eeffb19 100644 --- a/scripts/install +++ b/scripts/install @@ -13,15 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE FAILURE OF THE SCRIPT #================================================= -ynh_clean_setup () { -# Nettoyage des résidus d'installation non pris en charge par le script remove. - if test -n "$PID_TAIL" - then - SUPPRESS_WARNING kill -s 15 $PID_TAIL # Arrête l'exécution de tail. - sudo rm -f "$tempfile" - fi - echo "" -} ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est détectée. #================================================= @@ -46,6 +37,7 @@ then # Si le domaine existe dans Yunohost fi fi +path_url=$(ynh_normalize_url_path $path_url) # Check and normalize path CHECK_DOMAINPATH # Vérifie la disponibilité du path et du domaine. CHECK_FINALPATH # Vérifie que le dossier de destination n'est pas déjà utilisé. @@ -87,12 +79,9 @@ ynh_system_user_create $app # Créer le dossier de log sudo mkdir -p /var/log/$app sudo touch /var/log/$app/$app.log -install_log=/var/log/$app/installation.log -sudo touch $install_log sudo chown $app -R /var/log/$app -sudo chown admin -R $install_log -# Configuration de logrotate +# Setup logrotate ynh_use_logrotate #================================================= @@ -184,5 +173,3 @@ fi #================================================= sudo systemctl reload nginx - -# TODO wait for service availability