diff --git a/conf/nginx.conf b/conf/nginx.conf index d3e50e5..6f67957 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,7 +3,7 @@ location ^~ / { # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; - } + } proxy_pass http://127.0.0.1:__PORT__; proxy_redirect off; diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..4debaed --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,3 @@ +## Configuration + +* How to configure this app: From the admin panel and the plain file `/var/www/cryptpad/config/config.js.` diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..e1d24cc --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,3 @@ +## Configuration + +Comment configurer cette application : via le panneau d'administration ainsi que le fichier de configuration `/var/www/cryptpad/config/config.js`. diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png new file mode 100644 index 0000000..da04465 Binary files /dev/null and b/doc/screenshots/screenshot.png differ diff --git a/manifest.json b/manifest.json index 8b2fb9f..ea9b4f5 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,14 @@ }, "version": "4.5.0~ynh2", "url": "https://cryptpad.fr/", + "upstream": { + "license": "AGPL-3.0-only", + "website": "https://cryptpad.fr/", + "demo": "https://cryptpad.fr/", + "admindoc": "https://docs.cryptpad.fr/en/", + "userdoc": "https://yunohost.org/apps", + "code": "https://github.com/xwiki-labs/cryptpad" + }, "license": "AGPL-3.0-only", "maintainer": { "name": "frju365", diff --git a/scripts/install b/scripts/install index 777b82a..e96bac2 100644 --- a/scripts/install +++ b/scripts/install @@ -90,6 +90,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -113,6 +117,7 @@ ynh_add_systemd_config #================================================= ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js" +chmod 600 "$final_path/config/config.js" #================================================= # INSTALL CRYPTPAD @@ -131,9 +136,7 @@ popd || ynh_die #================================================= ynh_script_progression --message="Securing files and directories..." --weight=1 -chown -R $app:$app $final_path -chmod -R o-rwx $final_path -chmod 600 "$final_path/config/config.js" + #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/restore b/scripts/restore index 1b1ae01..f8350a0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,13 +64,10 @@ ynh_script_progression --message="Restoring CryptPad main directory..." --weight ynh_restore_file --origin_path="$final_path" -#================================================= -# RESTORE USER RIGHTS -#================================================= - # Restore permissions on app files -chown -R $app: $final_path -chmod -R o-rwx $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" chmod 600 "$final_path/config/config.js" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 95ae3a1..58e1f42 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -89,6 +89,7 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/config.js" + chmod 600 "$final_path/config/config.js" fi #================================================= @@ -141,9 +142,9 @@ ynh_add_systemd_config #================================================= # Set permissions on app files -chown -R $app: $final_path -chmod -R o-rwx $final_path -chmod 600 "$final_path/config/config.js" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:$app "$final_path" #================================================= # INTEGRATE SERVICE IN YUNOHOST