[enh] create blocks for MySQL and PHP command lines which are optionnals.

This commit is contained in:
Moul
2016-06-14 14:09:29 +02:00
parent bdbe0ac79e
commit daaf1005d5
6 changed files with 23 additions and 17 deletions

View File

@@ -13,19 +13,21 @@ app=$YNH_APP_INSTANCE_NAME
# Note: the last argument is where to save this path, see the restore script.
ynh_backup "/var/www/${app}" "sources"
### MySQL (remove if not used) ###
# If a MySQL database is used:
#
# # Dump the database
# dbname=$app
# dbuser=$app
# dbpass=$(ynh_app_setting_get "$app" mysqlpwd)
# mysqldump -u "$dbuser" -p"$dbpass" --no-create-db "$dbname" > ./dump.sql
### MySQL end ###
# Copy NGINX configuration
domain=$(ynh_app_setting_get "$app" domain)
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
### PHP (remove if not used) ###
# If a dedicated php-fpm process is used:
#
# # Copy PHP-FPM pool configuration
# ynh_backup "/etc/php5/fpm/pool.d/${app}.conf" "php-fpm.conf"
### PHP end ###