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:
parent
ff6367a5cb
commit
140608b2e6
3 changed files with 4 additions and 7 deletions
|
@ -6,7 +6,7 @@
|
|||
"en": "Automatic backups",
|
||||
"fr": "Sauvegardes automatiques"
|
||||
},
|
||||
"version": "1.3.1~ynh1",
|
||||
"version": "1.3.1~ynh2",
|
||||
"url": "https://github.com/maniackcrudelis/archivist",
|
||||
"license": "GPL-3.0",
|
||||
"maintainer": {
|
||||
|
|
|
@ -22,7 +22,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
|
||||
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
|
||||
apps_backup=$YNH_APP_ARG_APPS_BACKUP
|
||||
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"
|
||||
|
||||
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."
|
||||
ynh_print_ON
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -104,7 +102,7 @@ then
|
|||
encrypt=true
|
||||
|
||||
passkey="$final_path/passkey"
|
||||
ynh_print_OFF; echo "$encryption_pwd" > "$passkey"; ynh_print_ON
|
||||
echo "$encryption_pwd" > "$passkey"
|
||||
chmod 400 "$passkey"
|
||||
else
|
||||
encrypt=false
|
||||
|
|
|
@ -31,8 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
|
|
Loading…
Reference in a new issue