1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/osticket_ynh.git synced 2024-09-03 19:56:17 +02:00

Apply last example_ynh

This commit is contained in:
yalh76 2020-05-27 02:58:51 +02:00
parent 9d95cc4ca6
commit 7a6dd859cb

View file

@ -33,28 +33,36 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#=================================================
# STANDARD BACKUP STEPS
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_print_info --message="Backing up the main app directory..."
ynh_backup --src_path="$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_print_info --message="Backing up nginx web server configuration..."
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_print_info --message="Backing up php-fpm configuration..."
ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP A CRON FILE
#=================================================
ynh_backup --src_path="/etc/cron.d/$app"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
@ -62,15 +70,6 @@ ynh_print_info --message="Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP A CRON FILE
#=================================================
ynh_print_info --message="Backing up a cron file..."
ynh_backup --src_path="/etc/cron.d/$app"
#=================================================
# END OF SCRIPT
#=================================================