mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
Initial commit
This commit is contained in:
parent
a0a017dcb8
commit
2a1b5832de
1 changed files with 37 additions and 0 deletions
37
scripts/backup
Executable file
37
scripts/backup
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
#set -eu
|
||||
|
||||
#TRAP_ON () { # Activate signal capture
|
||||
# trap EXIT_PROPERLY ERR # Capturing ex it signals on error
|
||||
#}
|
||||
|
||||
# Active trap pour arrêter le script si une erreur est détectée.
|
||||
#TRAP_ON
|
||||
|
||||
# See comments in install script
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
path=$(ynh_app_setting_get $app path)
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
final_logpath=$(ynh_app_setting_get $app final_logpath)
|
||||
final_nginxconf=$(ynh_app_setting_get $app final_nginxconf)
|
||||
final_phpconf=$(ynh_app_setting_get $app final_phpconf)
|
||||
|
||||
# Backup sources & data
|
||||
# Note: the last argument is where to save this path, see the restore script.
|
||||
ynh_backup "$final_path" "sources"
|
||||
|
||||
# Backup logs
|
||||
ynh_backup "$final_logpath" "logs"
|
||||
|
||||
# Copy NGINX configuration
|
||||
ynh_backup "$final_nginxconf" "nginx.conf"
|
||||
|
||||
# Copy PHP-FPM configuration
|
||||
ynh_backup "$final_phpconf" "php-fpm.conf"
|
Loading…
Add table
Reference in a new issue