mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
commit
7928da6636
6 changed files with 11 additions and 41 deletions
|
@ -15,7 +15,6 @@
|
|||
upgrade=1 from_commit=ddbb3b36b8bcd00e573456bd9ad07b1aa5e41cb1
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
incorrect_path=0
|
||||
port_already_use=1
|
||||
change_url=1
|
||||
;;; Options
|
||||
|
|
|
@ -142,7 +142,7 @@ module.exports = {
|
|||
/* CryptPad will display a point of contact for your instance on its contact page
|
||||
* (/contact.html) if you provide it below.
|
||||
*/
|
||||
adminEmail: '__ADMIN_MAIL__',
|
||||
adminEmail: '__EMAIL__',
|
||||
|
||||
/*
|
||||
* By default, CryptPad contacts one of our servers once a day.
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
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;
|
||||
proxy_set_header Host $host;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Zero Knowledge realtime collaborative editor",
|
||||
"fr": "Éditeur chiffré collaboratif en temps réel."
|
||||
},
|
||||
"version": "4.2.1~ynh2",
|
||||
"version": "4.2.1~ynh3",
|
||||
"url": "https://cryptpad.fr/",
|
||||
"license": "AGPL-3.0-only",
|
||||
"maintainer": {
|
||||
|
@ -26,10 +26,6 @@
|
|||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain name for CryptPad",
|
||||
"fr": "Choisissez un nom de domaine pour CryptPad"
|
||||
},
|
||||
"help": {
|
||||
"en": "CryptPad needs to be installed in a dedicated domain or sub-domain.",
|
||||
"fr": "CryptPad doit être installé dans un domaine ou sous-domaine dédié."
|
||||
|
@ -39,19 +35,11 @@
|
|||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Choose an admin user",
|
||||
"fr": "Choisissez l’administrateur"
|
||||
},
|
||||
"example": "johndoe"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Is it a public site?",
|
||||
"fr": "Est-ce un site publique ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "If enabled, CryptPad will be accessible by people who do not have an account. This can be changed later via the webadmin.",
|
||||
"fr": "Si cette case est cochée, CryptPad sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||
|
|
|
@ -27,6 +27,7 @@ domain=$YNH_APP_ARG_DOMAIN
|
|||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
path_url="/"
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -49,8 +50,6 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
|
|||
ynh_app_setting_set --app=$app --key=path_url --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -113,15 +112,7 @@ ynh_add_systemd_config
|
|||
# CONFIGURE CONFIG.JS
|
||||
#=================================================
|
||||
|
||||
# Copy default configuration file
|
||||
mv "../conf/config.js" "$final_path/config/config.js"
|
||||
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js"
|
||||
ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js"
|
||||
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js"
|
||||
|
||||
# Store file checksum to detected user modifications on upgrade
|
||||
ynh_store_file_checksum "$final_path/config/config.js"
|
||||
ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js"
|
||||
|
||||
#=================================================
|
||||
# INSTALL CRYPTPAD
|
||||
|
|
|
@ -111,17 +111,7 @@ ynh_system_user_create --username=$app
|
|||
# CONFIGURE CONFIG.JS
|
||||
#=================================================
|
||||
|
||||
ynh_backup_if_checksum_is_different "$final_path/config/config.js"
|
||||
|
||||
# Copy default configuration file
|
||||
mv "../conf/config.js" "$final_path/config/config.js"
|
||||
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config/config.js"
|
||||
ynh_replace_string --match_string="__PORTI__" --replace_string="$porti" --target_file="$final_path/config/config.js"
|
||||
ynh_replace_string --match_string="__ADMIN_MAIL__" --replace_string="$email" --target_file="$final_path/config/config.js"
|
||||
|
||||
# Store file checksum to detected user modifications on upgrade
|
||||
ynh_store_file_checksum "$final_path/config/config.js"
|
||||
ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js"
|
||||
|
||||
#=================================================
|
||||
# INSTALL CRYPTPAD
|
||||
|
|
Loading…
Reference in a new issue