1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/archivist_ynh.git synced 2024-09-03 18:15:55 +02:00

Remove ynh_print_OFF/ON

This commit is contained in:
ericgaspar 2021-11-30 15:02:27 +01:00
parent ff6367a5cb
commit 140608b2e6
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 4 additions and 7 deletions

View file

@ -6,7 +6,7 @@
"en": "Automatic backups", "en": "Automatic backups",
"fr": "Sauvegardes automatiques" "fr": "Sauvegardes automatiques"
}, },
"version": "1.3.1~ynh1", "version": "1.3.1~ynh2",
"url": "https://github.com/maniackcrudelis/archivist", "url": "https://github.com/maniackcrudelis/archivist",
"license": "GPL-3.0", "license": "GPL-3.0",
"maintainer": { "maintainer": {

View file

@ -22,7 +22,7 @@ ynh_abort_if_errors
#================================================= #=================================================
encrypt=$YNH_APP_ARG_ENCRYPT encrypt=$YNH_APP_ARG_ENCRYPT
ynh_print_OFF; encryption_pwd=$YNH_APP_ARG_ENCRYPTION_PWD; ynh_print_ON encryption_pwd=$YNH_APP_ARG_ENCRYPTION_PWD
core_backup=$YNH_APP_ARG_CORE_BACKUP core_backup=$YNH_APP_ARG_CORE_BACKUP
apps_backup=$YNH_APP_ARG_APPS_BACKUP apps_backup=$YNH_APP_ARG_APPS_BACKUP
frequency="$YNH_APP_ARG_FREQUENCY" frequency="$YNH_APP_ARG_FREQUENCY"
@ -38,9 +38,7 @@ final_path=/opt/yunohost/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder" test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
if [ $encrypt -eq 1 ]; then if [ $encrypt -eq 1 ]; then
ynh_print_OFF
test -n "$encryption_pwd" || ynh_die --message="encryption_pwd can't be empty if you choose to enable encryption." test -n "$encryption_pwd" || ynh_die --message="encryption_pwd can't be empty if you choose to enable encryption."
ynh_print_ON
fi fi
#================================================= #=================================================
@ -104,7 +102,7 @@ then
encrypt=true encrypt=true
passkey="$final_path/passkey" passkey="$final_path/passkey"
ynh_print_OFF; echo "$encryption_pwd" > "$passkey"; ynh_print_ON echo "$encryption_pwd" > "$passkey"
chmod 400 "$passkey" chmod 400 "$passkey"
else else
encrypt=false encrypt=false

View file

@ -31,8 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." ynh_script_progression --message="Validating restoration parameters..."
test ! -d $final_path \ test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|| ynh_die --message="There is already a directory: $final_path "
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS