mirror of
https://github.com/YunoHost-Apps/minio_ynh.git
synced 2024-09-03 19:46:18 +02:00
Update upgrade
This commit is contained in:
parent
1528f50a40
commit
88b4b4da2a
1 changed files with 5 additions and 5 deletions
|
@ -136,8 +136,8 @@ ynh_script_progression --message="Ensuring downward compatibility..."
|
||||||
if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1
|
if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Moving old Filesystem to secure MinIO start"
|
ynh_script_progression --message="Moving old Filesystem to secure MinIO start"
|
||||||
old = "OLD"
|
tmp = "/tmp/minio"
|
||||||
mv "$datadir" "$datadir$old"
|
mv "$datadir" "$tmp"
|
||||||
mkdir "$datadir"
|
mkdir "$datadir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ ynh_script_progression --message="Ensuring downward compatibility..."
|
||||||
if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1
|
if ynh_compare_current_package_version --comparison lt --version 2022.12.12~ynh1
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode"
|
ynh_script_progression --message="Migration from Filesystem to Single-Node Single-Drive mode"
|
||||||
pushd $datadir$old
|
pushd $tmp
|
||||||
for d in * ; do
|
for d in * ; do
|
||||||
if [ "$d" == "*" ]
|
if [ "$d" == "*" ]
|
||||||
then
|
then
|
||||||
|
@ -182,7 +182,7 @@ then
|
||||||
mv "$d" "DATA_$d"
|
mv "$d" "DATA_$d"
|
||||||
pushd $mc_path
|
pushd $mc_path
|
||||||
ynh_exec_warn_less sudo -u $app ./mc mb minio/"$d"
|
ynh_exec_warn_less sudo -u $app ./mc mb minio/"$d"
|
||||||
ynh_exec_warn_less sudo -u $app ./mc mirror --preserve "$datadir$old/DATA_$d" minio/"$d"
|
ynh_exec_warn_less sudo -u $app ./mc mirror --preserve "$tmp/DATA_$d" minio/"$d"
|
||||||
# This is a hack, but it will make outline_ynh users' lifes much easier !
|
# This is a hack, but it will make outline_ynh users' lifes much easier !
|
||||||
if [ "$d" == "outlinestorage" ]
|
if [ "$d" == "outlinestorage" ]
|
||||||
then
|
then
|
||||||
|
@ -195,7 +195,7 @@ then
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
ynh_secure_remove --file="$datadir$old"
|
ynh_secure_remove --file="$tmp"
|
||||||
else
|
else
|
||||||
ynh_script_progression --message="No migration required"
|
ynh_script_progression --message="No migration required"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue