1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minio_ynh.git synced 2024-09-03 19:46:18 +02:00

fix sources and mc_path

This commit is contained in:
Tagada 2023-05-19 23:46:00 +02:00
parent 78db8fc9ba
commit 37e266c0cd
4 changed files with 14 additions and 19 deletions

View file

@ -46,7 +46,8 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
[resources] [resources]
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.minio]
extract = false
in_subdir = false in_subdir = false
arm64.url = "https://dl.min.io/server/minio/release/linux-arm64/archive/minio.RELEASE.2023-05-04T21-44-30Z" arm64.url = "https://dl.min.io/server/minio/release/linux-arm64/archive/minio.RELEASE.2023-05-04T21-44-30Z"
arm64.sha256 = "4948d289e75a54596e6c78a738f95a1bbec5ec159895406917c340d51c4375c9" arm64.sha256 = "4948d289e75a54596e6c78a738f95a1bbec5ec159895406917c340d51c4375c9"
@ -54,13 +55,13 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
amd64.sha256 = "2dce77cec0e4536c5736dee064e478a59dc063fe2e40e3f5fed275252de5e8c7" amd64.sha256 = "2dce77cec0e4536c5736dee064e478a59dc063fe2e40e3f5fed275252de5e8c7"
[resources.sources.mc] [resources.sources.mc]
extract = false
in_subdir = false in_subdir = false
arm64.url = "https://dl.min.io/client/mc/release/linux-arm64/archive/mc.RELEASE.2023-05-04T18-10-16Z" arm64.url = "https://dl.min.io/client/mc/release/linux-arm64/archive/mc.RELEASE.2023-05-04T18-10-16Z"
arm64.sha256 = "b2beb693e09528c25dbb566abf88bb0b94fd2477730c00a496bfceb0f8e9cd2b" arm64.sha256 = "b2beb693e09528c25dbb566abf88bb0b94fd2477730c00a496bfceb0f8e9cd2b"
amd64.url = "https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2023-05-04T18-10-16Z" amd64.url = "https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2023-05-04T18-10-16Z"
amd64.sha256 = "cd26ea353811880704efe8eb1b3335461240c1d4f7e4f3efee1b4391697662e4" amd64.sha256 = "cd26ea353811880704efe8eb1b3335461240c1d4f7e4f3efee1b4391697662e4"
[resources.system_user] [resources.system_user]
[resources.install_dir] [resources.install_dir]

View file

@ -9,8 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
mc_path=$install_dir/mc
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
#================================================= #=================================================
@ -19,14 +17,14 @@ mc_path=$install_dir/mc
ynh_script_progression --message="Setting up source files..." --weight=10 ynh_script_progression --message="Setting up source files..." --weight=10
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir/minio" --source_id="minio"
ynh_setup_source --dest_dir="$mc_path" --source_id="mc" ynh_setup_source --dest_dir="$install_dir/mc" --source_id="mc"
chmod 750 "$install_dir" chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod +x "$install_dir/minio" chmod +x "$install_dir/minio"
chmod +x "$mc_path/mc" chmod +x "$install_dir/mc"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -95,7 +93,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
#================================================= #=================================================
ynh_script_progression --message="Configuring MinIO client..." --weight=1 ynh_script_progression --message="Configuring MinIO client..." --weight=1
pushd $mc_path pushd $install_dir
ynh_exec_warn_less sudo -u $app ./mc --no-color alias set minio "http://127.0.0.1:$port" "$admin" "$password" --api S3v4 ynh_exec_warn_less sudo -u $app ./mc --no-color alias set minio "http://127.0.0.1:$port" "$admin" "$password" --api S3v4
popd popd

View file

@ -10,8 +10,6 @@
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
mc_path="$install_dir/mc"
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS
#================================================= #=================================================
@ -32,7 +30,7 @@ chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod +x "$install_dir/minio" chmod +x "$install_dir/minio"
chmod +x "$mc_path/mc" chmod +x "$install_dir/mc"
#================================================= #=================================================
# RESTORE THE DATA DIRECTORY # RESTORE THE DATA DIRECTORY

View file

@ -9,8 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
mc_path="$install_dir/mc"
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
@ -36,7 +34,7 @@ then
ynh_script_progression --message="No buckets to migrate" ynh_script_progression --message="No buckets to migrate"
else else
ynh_script_progression --message="Moving $d..." ynh_script_progression --message="Moving $d..."
ynh_exec_warn_less sudo -u $app $mc_path/mc mirror --preserve "minio/$d" "$tmp/$d" ynh_exec_warn_less sudo -u $app $install_dir/mc mirror --preserve "minio/$d" "$tmp/$d"
fi fi
done done
if ynh_compare_current_package_version --comparison eq --version 2022.09.01~ynh1 if ynh_compare_current_package_version --comparison eq --version 2022.09.01~ynh1
@ -79,15 +77,15 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep=".env" ynh_setup_source --dest_dir="$install_dir/minio"
ynh_setup_source --dest_dir="$mc_path" --source_id="mc_$YNH_ARCH" ynh_setup_source --dest_dir="$install_dir/mc" --source_id="mc"
fi fi
chmod 750 "$install_dir" chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod +x "$install_dir/minio" chmod +x "$install_dir/minio"
chmod +x "$mc_path/mc" chmod +x "$install_dir/mc"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -144,7 +142,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l
#================================================= #=================================================
ynh_script_progression --message="Configuring MinIO client..." --weight=1 ynh_script_progression --message="Configuring MinIO client..." --weight=1
pushd $mc_path pushd $install_dir
ynh_exec_warn_less sudo -u $app ./mc --no-color alias set minio "https://$domain" "$admin" "$password" --api S3v4 ynh_exec_warn_less sudo -u $app ./mc --no-color alias set minio "https://$domain" "$admin" "$password" --api S3v4
popd popd
@ -163,7 +161,7 @@ then
ynh_script_progression --message="No buckets to migrate" ynh_script_progression --message="No buckets to migrate"
else else
ynh_script_progression --message="Migrating bucket $d" ynh_script_progression --message="Migrating bucket $d"
pushd $mc_path pushd $install_dir
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 "$tmp/$d" "minio/$d" ynh_exec_warn_less sudo -u $app ./mc mirror --preserve "$tmp/$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 !