1
0
Fork 0
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:
Limezy 2023-01-28 14:22:34 +07:00
parent 67eee565d1
commit 19962cea4b

View file

@ -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