1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

reconfigure app after upgrade / change url

This commit is contained in:
Clément 2019-05-22 17:33:04 +02:00
parent 6a446dcca3
commit c80a2bc938
2 changed files with 30 additions and 0 deletions

View file

@ -21,6 +21,23 @@ new_path=$YNH_APP_NEW_PATH
app=$YNH_APP_INSTANCE_NAME
#=================================================
# LOAD SETTINGS
#=================================================
ynh_print_info "Loading installation settings..."
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# Add settings here as needed by your application
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
admin=$(ynh_app_setting_get --app=$app --key=admin)
language=$(ynh_app_setting_get --app=$app --key=language)
#=================================================
# CHECK PATHS SYNTAX
#=================================================
@ -75,6 +92,15 @@ then
ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
$final_path/cli/reconfigure.php --default_user $admin --auth_type http_auth --environment production --base_url $domain/$path_url --title FreshRSS --api_enabled --db-type mysql --db-host localhost --db-user $db_name --db-password $db_pwd --db-base $db_name
#=================================================
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -22,6 +22,7 @@ admin=$(ynh_app_setting_get $app admin)
final_path=$(ynh_app_setting_get $app final_path)
language=$(ynh_app_setting_get $app language)
db_name=$(ynh_app_setting_get $app db_name)
db_pwd=$(ynh_app_setting_get $app db_pwd)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
@ -143,6 +144,9 @@ chmod 755 $final_path
chown -R $app: $final_path/data/
chown -R $app: $final_path/extensions/
# reconfigure application with latest parameters
$final_path/cli/reconfigure.php --default_user $admin --auth_type http_auth --environment production --base_url $domain/$path_url --title FreshRSS --api_enabled --db-type mysql --db-host localhost --db-user $db_name --db-password $db_pwd --db-base $db_name
#=================================================
# SETUP SSOWAT
#=================================================