From bbb429feec6d70906baced78a852c8651b3f2f14 Mon Sep 17 00:00:00 2001 From: Yalh Date: Sun, 27 Jan 2019 09:07:55 +0100 Subject: [PATCH] fix restore --- scripts/restore | 20 ++++++++++---------- scripts/upgrade | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/restore b/scripts/restore index 65a5ca3..34efe40 100755 --- a/scripts/restore +++ b/scripts/restore @@ -29,8 +29,8 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) final_path=$(ynh_app_setting_get $app final_path) -statedir=$(ynh_app_setting_get $app statedir) -final_logpath=$(ynh_app_setting_get $app final_logpath) +config_path=$(ynh_app_setting_get $app config_path) +state_path=$(ynh_app_setting_get $app state_path) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -89,18 +89,18 @@ ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf" # REINSTALL DEPENDENCIES #================================================= -# Define and install dependencies -ynh_install_app_dependencies php-soap php5-imap libawl-php php5-xsl + +echo "deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" | tee /etc/apt/sources.list.d/z-push.list +wget -qO - http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key | sudo apt-key add - +yunohost tools update +ynh_install_app_dependencies z-push-common z-push-backend-caldav z-push-backend-carddav z-push-backend-combined z-push-backend-imap z-push-backend-ldap z-push-backend-galsearch-ldap z-push-autodiscover +ynh_install_app_dependencies php-memcached php-cli php-soap # Restore statedir -sudo mkdir -p $statedir -sudo cp -a ./statedir/. $statedir/ -sudo chown -R www-data:www-data $statedir +ynh_restore_file "$config_path" # Restore logs, data & permissions -sudo mkdir -p $final_logpath -sudo cp -a ./logs/. $final_logpath/ -sudo chown -R www-data:www-data $final_logpath +ynh_restore_file "$state_path" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e1c8be5..cd910c6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,7 @@ ynh_add_fpm_config #================================================= # ... #================================================= - +z-push-admin -a fixstates # Configuration sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" ../conf/config.php sed -i "s@LOGTOCHANGE@$final_logpath@g" ../conf/config.php