mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Update data_home/mail backup hooks to use ynh_backup helper
This commit is contained in:
parent
403b1d71a3
commit
f9f8673e76
2 changed files with 2 additions and 7 deletions
|
@ -1,10 +1,7 @@
|
|||
backup_dir="$1/data/home"
|
||||
sudo mkdir -p $backup_dir
|
||||
|
||||
. /usr/share/yunohost/helpers
|
||||
|
||||
for f in $(find /home/* -type d -prune | awk -F/ '{print $NF}'); do
|
||||
if [[ ! "$f" =~ ^yunohost|lost\+found ]]; then
|
||||
ynh_bind_or_cp "/home/$f" "${backup_dir}/$f" 1
|
||||
ynh_backup "/home/$f" "${1}/data/home/$f" 1
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
backup_dir="$1/data/mail"
|
||||
|
||||
. /usr/share/yunohost/helpers
|
||||
|
||||
ynh_bind_or_cp /var/mail $backup_dir 1
|
||||
ynh_backup /var/mail "${1}/data/mail" 1
|
||||
|
|
Loading…
Add table
Reference in a new issue