mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
Update install
This commit is contained in:
parent
97dceeb54a
commit
0ea6081698
1 changed files with 4 additions and 3 deletions
|
@ -22,6 +22,7 @@ ynh_abort_if_errors # Active trap pour arrêter le script si une erreur est dét
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
|
admin_email=$YNH_APP_ARG_EMAIL
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ ynh_app_setting_set $app path_url "$path_url"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Find a free port
|
# Find a free port
|
||||||
port=$(ynh_find_port 3000)
|
port=$(ynh_find_port 4000)
|
||||||
# Open this port
|
# Open this port
|
||||||
yunohost firewall allow --no-upnp TCP $port 2>&1
|
yunohost firewall allow --no-upnp TCP $port 2>&1
|
||||||
ynh_app_setting_set $app port $port
|
ynh_app_setting_set $app port $port
|
||||||
|
@ -129,7 +130,7 @@ popd
|
||||||
|
|
||||||
# Copy default configuration file
|
# Copy default configuration file
|
||||||
mv "$final_path/config.example.js" "$final_path/config.js"
|
mv "$final_path/config.example.js" "$final_path/config.js"
|
||||||
|
ynh_replace_string "_domain = 'http://localhost:3000/'" "_domain = 'https://$domain$path_url'" "$final_path/config.js"
|
||||||
# Set service port
|
# Set service port
|
||||||
ynh_replace_string "httpPort: 3000" "httpPort: $port" "$final_path/config.js"
|
ynh_replace_string "httpPort: 3000" "httpPort: $port" "$final_path/config.js"
|
||||||
# Tune CSP to allow for YunoHost tile
|
# Tune CSP to allow for YunoHost tile
|
||||||
|
@ -137,7 +138,7 @@ ynh_replace_string "httpPort: 3000" "httpPort: $port" "$final_path/config.js"
|
||||||
# Remove donate button
|
# Remove donate button
|
||||||
ynh_replace_string "removeDonateButton: false" "removeDonateButton: true" "$final_path/config.js"
|
ynh_replace_string "removeDonateButton: false" "removeDonateButton: true" "$final_path/config.js"
|
||||||
# Disable analytics unsolicited communications
|
# Disable analytics unsolicited communications
|
||||||
ynh_replace_string "adminEmail: 'i.did.not.read.my.config@cryptpad.fr'" "adminEmail: false" "$final_path/config.js"
|
ynh_replace_string "adminEmail: 'i.did.not.read.my.config@cryptpad.fr'" "adminEmail: $admin_email" "$final_path/config.js"
|
||||||
|
|
||||||
# Store file checksum to detected user modifications on upgrade
|
# Store file checksum to detected user modifications on upgrade
|
||||||
ynh_store_file_checksum "$final_path/config.js"
|
ynh_store_file_checksum "$final_path/config.js"
|
||||||
|
|
Loading…
Reference in a new issue