1
0
Fork 0
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:
frju365 2019-01-05 20:09:35 +01:00 committed by GitHub
parent 97dceeb54a
commit 0ea6081698
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"