mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
fix db variables
This commit is contained in:
parent
4ec516dd63
commit
6c42c48fa1
1 changed files with 3 additions and 4 deletions
|
@ -13,14 +13,13 @@ db_name=$app
|
|||
# retrieve useful param
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
path=$(ynh_app_setting_get $app path)
|
||||
dbpass=$(ynh_app_setting_get $app mysqlpwd)
|
||||
db_pass=$(ynh_app_setting_get $app mysqlpwd)
|
||||
|
||||
# Check domain/path availability
|
||||
sudo yunohost app checkurl $domain$path -a $app || ynh_die "The path ${domain}${path} is not available for app installation."
|
||||
|
||||
# Restore sources & data
|
||||
final_path=/var/www/$app
|
||||
sudo mkdir $final_path
|
||||
ynh_backup "www" "$final_path"
|
||||
|
||||
# Restore permissions
|
||||
|
@ -33,8 +32,8 @@ ynh_backup nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
|||
ynh_backup $app.cron /etc/cron.d/$app
|
||||
|
||||
# Restore mysql dump
|
||||
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
|
||||
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < "$app.dmp"
|
||||
ynh_mysql_create_db "$db_name" "$db_user" "$db_pass"
|
||||
ynh_mysql_connect_as "$db_user" "$db_pass" "$db_name" < "$app.dmp"
|
||||
|
||||
# Reload Nginx, and regenerate SSOwat conf
|
||||
sudo service nginx reload
|
||||
|
|
Loading…
Add table
Reference in a new issue