mirror of
https://github.com/YunoHost-Apps/xwiki_ynh.git
synced 2024-09-03 20:36:11 +02:00
fix restoration
This commit is contained in:
parent
8846be1a7c
commit
4b950a3f60
1 changed files with 5 additions and 9 deletions
|
@ -13,30 +13,26 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP MAIN DIR
|
# RESTORE THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
ynh_script_progression --message="Restoring files..." --weight=10
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$install_dir"
|
ynh_restore
|
||||||
set_permissions
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE MYSQL DATABASE
|
# RESTORE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
|
ynh_script_progression --message="Restoring the database..." --weight=1
|
||||||
|
|
||||||
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEM CONFIGURATIONS
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
mkdir -p /var/log/"$app"
|
||||||
|
set_permissions
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
|
||||||
systemctl enable $app.service --quiet
|
systemctl enable $app.service --quiet
|
||||||
|
|
||||||
yunohost service add $app --description=XWiki --log="/var/log/$app/$app.log"
|
yunohost service add $app --description=XWiki --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
ynh_use_logrotate --logfile "/var/log/$app"
|
ynh_use_logrotate --logfile "/var/log/$app"
|
||||||
|
|
Loading…
Add table
Reference in a new issue