diff --git a/scripts/backup b/scripts/backup index f99225d..7153574 100755 --- a/scripts/backup +++ b/scripts/backup @@ -30,9 +30,16 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path_url) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) +language_key=$(ynh_app_setting_get --app=$app --key=language_key) +slack_key=$(ynh_app_setting_get --app=$app --key=slack_key) +slack_secret=$(ynh_app_setting_get --app=$app --key=slack_secret) + +minio_domain=$(ynh_app_setting_get --app="minio" --key=domain) +minio_id=$(ynh_app_setting_get --app="minio" --key=minio_id) +minio_key=$(ynh_app_setting_get --app="minio" --key=minio_key) +mc_path=$(ynh_app_setting_get --app="minio" --key=mc_path) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -51,10 +58,10 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" #================================================= -# BACKUP THE DATA DIR +# BACKUP MINIO #================================================= -ynh_backup --src_path="$datadir" --is_big +sudo yunohost backup create --apps minio #================================================= # BACKUP THE NGINX CONFIGURATION @@ -62,12 +69,6 @@ ynh_backup --src_path="$datadir" --is_big ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - #================================================= # BACKUP FAIL2BAN CONFIGURATION #================================================= @@ -90,15 +91,7 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= -# BACKUP VARIOUS FILES -#================================================= - -ynh_backup --src_path="/etc/cron.d/$app" - -ynh_backup --src_path="/etc/$app/" - -#================================================= -# BACKUP THE MYSQL DATABASE +# BACKUP THE POSTGRE DATABASE #================================================= ynh_print_info --message="Backing up the MySQL database..." diff --git a/scripts/install b/scripts/install index 4486b09..579e35c 100755 --- a/scripts/install +++ b/scripts/install @@ -38,8 +38,8 @@ else echo "English" fi -secret_key=`openssl rand -hex 32` -utils_secret=`openssl rand -hex 32` +secret_key=$(ynh_string_random --length=32) +utils_secret=$(ynh_string_random --length=32) slack_key=$YNH_APP_ARG_SLACK_KEY slack_secret=$YNH_APP_ARG_SLACK_SECRET