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

Some clean-up

This commit is contained in:
Jimmy Monin 2017-07-30 21:33:17 +02:00
parent a22954feac
commit 910d0f6962
4 changed files with 11 additions and 43 deletions

View file

@ -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)

View file

@ -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

View file

@ -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;

View file

@ -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