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
|
upgrade=1 from_commit=ddbb3b36b8bcd00e573456bd9ad07b1aa5e41cb1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
incorrect_path=0
|
|
||||||
port_already_use=1
|
port_already_use=1
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
|
|
|
@ -142,7 +142,7 @@ module.exports = {
|
||||||
/* CryptPad will display a point of contact for your instance on its contact page
|
/* CryptPad will display a point of contact for your instance on its contact page
|
||||||
* (/contact.html) if you provide it below.
|
* (/contact.html) if you provide it below.
|
||||||
*/
|
*/
|
||||||
adminEmail: '__ADMIN_MAIL__',
|
adminEmail: '__EMAIL__',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* By default, CryptPad contacts one of our servers once a day.
|
* By default, CryptPad contacts one of our servers once a day.
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
location ^~ / {
|
location ^~ / {
|
||||||
|
|
||||||
# Force usage of https
|
# Force usage of https
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Zero Knowledge realtime collaborative editor",
|
"en": "Zero Knowledge realtime collaborative editor",
|
||||||
"fr": "Éditeur chiffré collaboratif en temps réel."
|
"fr": "Éditeur chiffré collaboratif en temps réel."
|
||||||
},
|
},
|
||||||
"version": "4.2.1~ynh2",
|
"version": "4.2.1~ynh3",
|
||||||
"url": "https://cryptpad.fr/",
|
"url": "https://cryptpad.fr/",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -26,10 +26,6 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain name for CryptPad",
|
|
||||||
"fr": "Choisissez un nom de domaine pour CryptPad"
|
|
||||||
},
|
|
||||||
"help": {
|
"help": {
|
||||||
"en": "CryptPad needs to be installed in a dedicated domain or sub-domain.",
|
"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é."
|
"fr": "CryptPad doit être installé dans un domaine ou sous-domaine dédié."
|
||||||
|
@ -39,19 +35,11 @@
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "user",
|
"type": "user",
|
||||||
"ask": {
|
|
||||||
"en": "Choose an admin user",
|
|
||||||
"fr": "Choisissez l’administrateur"
|
|
||||||
},
|
|
||||||
"example": "johndoe"
|
"example": "johndoe"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
|
||||||
"en": "Is it a public site?",
|
|
||||||
"fr": "Est-ce un site publique ?"
|
|
||||||
},
|
|
||||||
"help": {
|
"help": {
|
||||||
"en": "If enabled, CryptPad will be accessible by people who do not have an account. This can be changed later via the webadmin.",
|
"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."
|
"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
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
path_url="/"
|
path_url="/"
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
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=path_url --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
|
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -113,15 +112,7 @@ ynh_add_systemd_config
|
||||||
# CONFIGURE CONFIG.JS
|
# CONFIGURE CONFIG.JS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Copy default configuration file
|
ynh_add_config --template="../conf/config.js" --destination="$final_path/config/config.js"
|
||||||
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"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL CRYPTPAD
|
# INSTALL CRYPTPAD
|
||||||
|
|
|
@ -111,17 +111,7 @@ ynh_system_user_create --username=$app
|
||||||
# CONFIGURE CONFIG.JS
|
# CONFIGURE CONFIG.JS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different "$final_path/config/config.js"
|
ynh_add_config --template="../conf/config.js" --destination="$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"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL CRYPTPAD
|
# INSTALL CRYPTPAD
|
||||||
|
|
Loading…
Reference in a new issue