1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00

fix restore

This commit is contained in:
Yalh 2019-01-27 09:07:55 +01:00
parent ec23bedb35
commit bbb429feec
2 changed files with 11 additions and 11 deletions

View file

@ -29,8 +29,8 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path) path_url=$(ynh_app_setting_get $app path)
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get $app final_path)
statedir=$(ynh_app_setting_get $app statedir) config_path=$(ynh_app_setting_get $app config_path)
final_logpath=$(ynh_app_setting_get $app final_logpath) state_path=$(ynh_app_setting_get $app state_path)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED
@ -89,18 +89,18 @@ ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf"
# REINSTALL DEPENDENCIES # 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 # Restore statedir
sudo mkdir -p $statedir ynh_restore_file "$config_path"
sudo cp -a ./statedir/. $statedir/
sudo chown -R www-data:www-data $statedir
# Restore logs, data & permissions # Restore logs, data & permissions
sudo mkdir -p $final_logpath ynh_restore_file "$state_path"
sudo cp -a ./logs/. $final_logpath/
sudo chown -R www-data:www-data $final_logpath
#================================================= #=================================================

View file

@ -107,7 +107,7 @@ ynh_add_fpm_config
#================================================= #=================================================
# ... # ...
#================================================= #=================================================
z-push-admin -a fixstates
# Configuration # Configuration
sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" ../conf/config.php sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" ../conf/config.php
sed -i "s@LOGTOCHANGE@$final_logpath@g" ../conf/config.php sed -i "s@LOGTOCHANGE@$final_logpath@g" ../conf/config.php