diff --git a/scripts/install b/scripts/install index ff9097e..1f16515 100644 --- a/scripts/install +++ b/scripts/install @@ -98,6 +98,9 @@ ynh_setup_source --dest_dir="$final_path/build/" --source_id="app" # Download, check integrity, uncompress and patch the source from web.src ynh_setup_source --dest_dir="$final_path/live/web-vault/" --source_id="web" +mkdir -p "$final_path/.rustup" +mkdir -p "$final_path/.cargo" + chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" @@ -119,7 +122,7 @@ ynh_script_progression --message="Making install..." # Install rustup with the toolchain needed by vaultwarden pushd "$final_path" - ynh_exec_as "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly' + ynh_exec_as "$app" RUSTUP_HOME="$final_path/.rustup" CARGO_HOME="$final_path/.cargo" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly' popd export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" diff --git a/scripts/upgrade b/scripts/upgrade index dc9a94e..2a71492 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -151,6 +151,9 @@ then # Download, check integrity, uncompress and patch the source from web.src ynh_setup_source --dest_dir="$final_path/live/web-vault/" --source_id="web" + + mkdir -p "$final_path/.rustup" + mkdir -p "$final_path/.cargo" fi chmod 750 "$final_path" @@ -186,7 +189,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then # Install rustup with the toolchain needed by vaultwarden pushd "$final_path" - ynh_exec_as "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly' + ynh_exec_as "$app" RUSTUP_HOME="$final_path/.rustup" CARGO_HOME="$final_path/.cargo" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly' popd export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"