From 40a1ddf9ac0332bc6556f300611f448c39d59bff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 16 Jul 2021 16:49:14 +0200 Subject: [PATCH] Update install --- scripts/install | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 03a2d36..4791957 100644 --- a/scripts/install +++ b/scripts/install @@ -111,17 +111,18 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Configuring Mumble web client..." --weight=1 -ynh_use_nodejs -( - cd $final_path - chown -R $app: $final_path - cargo build --release - - ynh_exec_warn_less ynh_exec_as "$app" PATH="$nodejs_path:$PATH" "$nodejs_path/npm" install --save --loglevel warn - ynh_exec_warn_less ynh_exec_as "$app" PATH="$nodejs_path:$PATH" "$nodejs_path/npm" run build - ls -lah -) +# Install rustup with the toolchain needed by vaultwarden +pushd "$final_path" + sudo -u "$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" + +# Compile vaultwarden +pushd "$final_path"/build + ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --release +popd #================================================= # ADD A CONFIGURATION