mirror of
https://github.com/YunoHost-Apps/minio_ynh.git
synced 2024-09-03 19:46:18 +02:00
Prevent mistake if no buckets to migrate
This commit is contained in:
parent
67eee565d1
commit
19962cea4b
1 changed files with 19 additions and 14 deletions
|
@ -161,6 +161,10 @@ then
|
|||
ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode"
|
||||
pushd $datadir
|
||||
for d in * ; do
|
||||
if [ "$d" == "*" ]
|
||||
then
|
||||
ynh_script_progression --message="No buckets to migrate"
|
||||
else
|
||||
ynh_script_progression --message="Migrating bucket $d"
|
||||
mv "$d" "DATA_$d"
|
||||
pushd $mc_path
|
||||
|
@ -175,6 +179,7 @@ then
|
|||
fi
|
||||
popd
|
||||
ynh_secure_remove --file="DATA_$d"
|
||||
fi
|
||||
done
|
||||
popd
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue