mirror of https://github.com/tteck/Proxmox.git
Update vaultwarden-install.sh
This commit is contained in:
parent
932e8b3ff9
commit
3b60326861
|
@ -1,4 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
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) }') \
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o errtrace
|
set -o errtrace
|
||||||
|
@ -97,19 +100,9 @@ file target/release/vaultwarden &>/dev/null
|
||||||
echo -e "${CM}${CL} \r"
|
echo -e "${CM}${CL} \r"
|
||||||
|
|
||||||
echo -en "${GN} Building Web-Vault... "
|
echo -en "${GN} Building Web-Vault... "
|
||||||
pushd target/release/ &>/dev/null
|
wget https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null
|
||||||
git clone --recurse-submodules https://github.com/bitwarden/web.git web-vault.git &>/dev/null
|
tar -xzf bw_web_$VWRELEASE.tar.gz &>/dev/null
|
||||||
cd web-vault.git &>/dev/null
|
cp -R web-vault /var/lib/vaultwarden/ &>/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 ..
|
|
||||||
mkdir data
|
|
||||||
echo -e "${CM}${CL} \r"
|
echo -e "${CM}${CL} \r"
|
||||||
|
|
||||||
echo -en "${GN} Create Systemd Service... "
|
echo -en "${GN} Create Systemd Service... "
|
||||||
|
@ -143,6 +136,7 @@ ReadWriteDirectories=/var/lib/vaultwarden
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" > $service_path
|
WantedBy=multi-user.target" > $service_path
|
||||||
|
systemctl daemon-reload
|
||||||
systemctl enable vaultwarden.service &>/dev/null
|
systemctl enable vaultwarden.service &>/dev/null
|
||||||
systemctl start vaultwarden.service &>/dev/null
|
systemctl start vaultwarden.service &>/dev/null
|
||||||
echo -e "${CM}${CL} \r"
|
echo -e "${CM}${CL} \r"
|
||||||
|
|
Loading…
Reference in New Issue