From 0ea6081698471941bb372f2898682462204ab4d9 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 5 Jan 2019 20:09:35 +0100 Subject: [PATCH] Update install --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d5e0f86..fadaf20 100644 --- a/scripts/install +++ b/scripts/install @@ -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 is_public=$YNH_APP_ARG_IS_PUBLIC path_url=$YNH_APP_ARG_PATH +admin_email=$YNH_APP_ARG_EMAIL app=$YNH_APP_INSTANCE_NAME @@ -55,7 +56,7 @@ ynh_app_setting_set $app path_url "$path_url" #================================================= # Find a free port -port=$(ynh_find_port 3000) +port=$(ynh_find_port 4000) # Open this port yunohost firewall allow --no-upnp TCP $port 2>&1 ynh_app_setting_set $app port $port @@ -129,7 +130,7 @@ popd # Copy default configuration file 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 ynh_replace_string "httpPort: 3000" "httpPort: $port" "$final_path/config.js" # 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 ynh_replace_string "removeDonateButton: false" "removeDonateButton: true" "$final_path/config.js" # 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 ynh_store_file_checksum "$final_path/config.js"