mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
commit
7221622a75
8 changed files with 28 additions and 25 deletions
|
@ -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;
|
||||
|
|
3
doc/DISCLAIMER.md
Normal file
3
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
## Configuration
|
||||
|
||||
* How to configure this app: From the admin panel and the plain file `/var/www/cryptpad/config/config.js.`
|
3
doc/DISCLAIMER_fr.md
Normal file
3
doc/DISCLAIMER_fr.md
Normal file
|
@ -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`.
|
BIN
doc/screenshots/screenshot.png
Normal file
BIN
doc/screenshots/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
@ -126,15 +131,6 @@ pushd "$final_path" || ynh_die
|
|||
ynh_exec_warn_less bower install --allow-root
|
||||
popd || ynh_die
|
||||
|
||||
#=================================================
|
||||
# Set some permissions
|
||||
#=================================================
|
||||
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
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -89,6 +89,11 @@ 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 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:$app "$final_path"
|
||||
chmod 600 "$final_path/config/config.js"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -136,15 +141,6 @@ ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --ta
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R $app: $final_path
|
||||
chmod -R o-rwx $final_path
|
||||
chmod 600 "$final_path/config/config.js"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue