mirror of
https://github.com/YunoHost-Apps/minio_ynh.git
synced 2024-09-03 19:46:18 +02:00
Second try
This commit is contained in:
parent
1fcd9ec64d
commit
e1d23df8d0
1 changed files with 13 additions and 9 deletions
|
@ -159,6 +159,7 @@ ynh_script_progression --message="Ensuring downward compatibility..."
|
|||
if [ "$(yunohost app info minio | grep -oEi [0-9]{4})" == "2022" ]
|
||||
then
|
||||
ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode"
|
||||
pushd $datadir
|
||||
for d in * ; do
|
||||
ynh_script_progression --message="Migrating bucket $d"
|
||||
mv "$d" "DATA_$d"
|
||||
|
@ -166,8 +167,11 @@ then
|
|||
chmod 750 "$d"
|
||||
chmod -R o-rwx "$d"
|
||||
chown -R $app:www-data "$d"
|
||||
ynh_exec_warn_less sudo -u $app ./mc mirror --preserve --watch "DATA_$d" minio/"$d"
|
||||
pushd $mc_path
|
||||
ynh_exec_warn_less sudo -u $app ./mc mirror --preserve --watch "$datadir/DATA_$d" minio/"$d"
|
||||
popd
|
||||
done
|
||||
popd
|
||||
else
|
||||
ynh_script_progression --message="No migration required"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue