mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Simplify restore script
Using `ynh_restore` helper, introduced in ynh 2.6.3
This commit is contained in:
parent
1bf80cf0f5
commit
e96d348493
1 changed files with 4 additions and 10 deletions
|
@ -47,21 +47,15 @@ install_apt_dependencies
|
|||
|
||||
create_unix_user
|
||||
|
||||
# Restore the app files
|
||||
sudo cp -a ./install_dir/. "$INSTALL_DIR"
|
||||
create_system_dirs
|
||||
|
||||
# Restore all backed-up files
|
||||
ynh_restore
|
||||
|
||||
# Create and restore the database
|
||||
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
|
||||
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ./db.sql
|
||||
|
||||
create_system_dirs
|
||||
|
||||
# Restore settings
|
||||
sudo cp -a "conf/nginx.conf" "$nginx_conf_path"
|
||||
sudo cp -a "conf/gunicorn.conf.py" "$gunicorn_conf_path"
|
||||
sudo cp -a "conf/supervisor.conf" "$supervisor_conf_path"
|
||||
sudo cp -a "conf/ihatemoney.cfg" "$ihatemoney_conf_path"
|
||||
|
||||
# Reload
|
||||
sudo systemctl reload nginx
|
||||
sudo systemctl restart supervisor
|
||||
|
|
Loading…
Reference in a new issue