mirror of https://github.com/tteck/Proxmox.git
Update vaultwarden-install.sh
This commit is contained in:
parent
2c9208a707
commit
6ffa555d2a
|
@ -94,28 +94,32 @@ pushd vaultwarden &>/dev/null
|
||||||
cargo clean &>/dev/null
|
cargo clean &>/dev/null
|
||||||
cargo build --features sqlite --release &>/dev/null
|
cargo build --features sqlite --release &>/dev/null
|
||||||
file target/release/vaultwarden &>/dev/null
|
file target/release/vaultwarden &>/dev/null
|
||||||
|
echo -e "${CM}${CL} \r"
|
||||||
|
|
||||||
|
echo -en "${GN} Building Web-Vault... "
|
||||||
|
pushd target/release/ &>/dev/null
|
||||||
|
git clone --recurse-submodules https://github.com/bitwarden/web.git web-vault.git &>/dev/null
|
||||||
|
cd web-vault.git &>/dev/null
|
||||||
|
git checkout v2.25.1 &>/dev/null
|
||||||
|
git submodule update --init --recursive &>/dev/null
|
||||||
|
wget https://raw.githubusercontent.com/dani-garcia/bw_web_builds/master/patches/v2.25.0.patch &>/dev/null
|
||||||
|
git apply v2.25.0.patch &>/dev/null
|
||||||
|
npm ci --silent --legacy-peer-deps &>/dev/null
|
||||||
|
npm audit fix --silent --legacy-peer-deps || true &>/dev/null
|
||||||
|
npm run --silent dist:oss:selfhost &>/dev/null
|
||||||
|
cp -a build ../web-vault &>/dev/null
|
||||||
cd ..
|
cd ..
|
||||||
mkdir data
|
mkdir data
|
||||||
#cp ../../.env.template /etc/vaultwarden.env &>/dev/null
|
echo -e "${CM}${CL} \r"
|
||||||
|
|
||||||
|
echo -en "${GN} Create Systemd Service... "
|
||||||
|
cp ../../.env.template /etc/vaultwarden.env &>/dev/null
|
||||||
cp vaultwarden /usr/bin/vaultwarden &>/dev/null
|
cp vaultwarden /usr/bin/vaultwarden &>/dev/null
|
||||||
chmod +x /usr/bin/vaultwarden &>/dev/null
|
chmod +x /usr/bin/vaultwarden &>/dev/null
|
||||||
useradd -m -d /var/lib/vaultwarden vaultwarden &>/dev/null
|
useradd -m -d /var/lib/vaultwarden vaultwarden &>/dev/null
|
||||||
sudo cp -R data /var/lib/vaultwarden/ &>/dev/null
|
sudo cp -R data /var/lib/vaultwarden/ &>/dev/null
|
||||||
#cp -R web-vault /var/lib/vaultwarden/ &>/dev/null
|
|
||||||
chown -R vaultwarden:vaultwarden /var/lib/vaultwarden &>/dev/null
|
|
||||||
echo -e "${CM}${CL} \r"
|
|
||||||
|
|
||||||
VWRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/releases/latest \
|
|
||||||
| grep "tag_name" \
|
|
||||||
| awk '{print substr($2, 2, length($2)-3) }') \
|
|
||||||
|
|
||||||
echo -en "${GN} Downloading Web-Vault ${VWRELEASE}... "
|
|
||||||
wget https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null
|
|
||||||
tar -xzf bw_web_$VWRELEASE.tar.gz &>/dev/null
|
|
||||||
cp -R web-vault /var/lib/vaultwarden/ &>/dev/null
|
cp -R web-vault /var/lib/vaultwarden/ &>/dev/null
|
||||||
echo -e "${CM}${CL} \r"
|
chown -R vaultwarden:vaultwarden /var/lib/vaultwarden &>/dev/null
|
||||||
|
|
||||||
echo -en "${GN} Create Systemd Service... "
|
|
||||||
|
|
||||||
service_path="/etc/systemd/system/vaultwarden.service" &>/dev/null
|
service_path="/etc/systemd/system/vaultwarden.service" &>/dev/null
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue