1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streams_ynh.git synced 2024-09-03 20:26:20 +02:00

cleanup finished

This commit is contained in:
dragondaddy 2024-09-03 11:38:52 +02:00
parent 66f1642023
commit c311e9762c
4 changed files with 12 additions and 13 deletions

View file

@ -7,10 +7,11 @@ source /usr/share/yunohost/helpers
ynh_print_info "Declaring files to be backed up..." ynh_print_info "Declaring files to be backed up..."
#================================================= #=================================================
# BACKUP THE APP MAIN DIR # BACKUP THE APP MAIN DIR & DATA DIR
#================================================= #=================================================
ynh_backup "$install_dir" ynh_backup "$install_dir"
ynh_backup "$data_dir"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE NGINX CONFIGURATION
@ -44,7 +45,6 @@ ynh_backup "/etc/logrotate.d/$app"
#================================================= #=================================================
ynh_backup "/etc/cron.d/$app" ynh_backup "/etc/cron.d/$app"
ynh_backup "$data_dir"
#================================================= #=================================================
# BACKUP THE DATABASE # BACKUP THE DATABASE

View file

@ -53,8 +53,6 @@ ynh_script_progression "Pulling in external libraries with Composer..."
ynh_composer_install ynh_composer_install
ynh_composer_exec install --no-dev ynh_composer_exec install --no-dev
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================

View file

@ -5,11 +5,12 @@ source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR & DATA DIR
#================================================= #=================================================
ynh_script_progression "Restoring the app main directory..." ynh_script_progression "Restoring the app main directory..."
ynh_restore "$install_dir" ynh_restore "$install_dir"
ynh_restore "$data_dir"
#================================================= #=================================================
# RESTORE THE DATABASE # RESTORE THE DATABASE
@ -33,7 +34,6 @@ ynh_systemctl --action=restart --service=fail2ban
# RESTORE CRON JOBS # RESTORE CRON JOBS
#================================================= #=================================================
ynh_restore "/etc/cron.d/$app" ynh_restore "/etc/cron.d/$app"
ynh_restore "$data_dir"
#================================================= #=================================================
# RESTORE LOGROTATE # RESTORE LOGROTATE

View file

@ -24,9 +24,12 @@ if ynh_app_upstream_version_changed
then then
ynh_script_progression "Upgrading source files..." ynh_script_progression "Upgrading source files..."
# First we save what we need to keep # Move data to the data_dir if it's still in install_dir
mv $install_dir/store $data_dir/ if [ ! -d "$data_dir/store" ]
mv $install_dir/cache $data_dir/ then
ynh_exec_as_app mv $install_dir/store $data_dir/
ynh_exec_as_app mv $install_dir/cache $data_dir/
fi
# Then we remove the previous install # Then we remove the previous install
ynh_safe_rm $install_dir ynh_safe_rm $install_dir
@ -35,10 +38,8 @@ then
ynh_setup_source --dest_dir="$install_dir/addon" --source_id="addons" ynh_setup_source --dest_dir="$install_dir/addon" --source_id="addons"
# We restore what we previously saved # We restore what we previously saved
mv $data_dir/store $install_dir/ ynh_exec_as_app ln -s $data_dir/store $install_dir/
mv $data_dir/cache $install_dir/ ynh_exec_as_app ln -s $data_dir/cache $install_dir/
ynh_exec_as_app chmod -R 775 $install_dir/store $install_dir/cache
fi fi
#================================================= #=================================================