Update wastebin-install.sh

pull/2640/head
CanbiZ 1 year ago committed by GitHub
parent fa3ae4652b
commit 2d14a5a256
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      install/wastebin-install.sh

@ -17,7 +17,6 @@ update_os
msg_info "Installing Dependencies (Patience)" msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y --no-install-recommends \ $STD apt-get install -y --no-install-recommends \
unzip \
build-essential \ build-essential \
curl \ curl \
sudo \ sudo \
@ -27,17 +26,17 @@ $STD apt-get install -y --no-install-recommends \
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Rust (Patience)" msg_info "Installing Rust (Patience)"
$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y
$STD source ~/.cargo/env source ~/.cargo/env
msg_ok "Installed Rust" msg_ok "Installed Rust"
RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
$STD wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip" wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip"
$STD unzip -q ${RELEASE}.zip unzip -q ${RELEASE}.zip
mv wastebin-${RELEASE} /opt/wastebin mv wastebin-${RELEASE} /opt/wastebin
rm -R ${RELEASE}.zip rm -R ${RELEASE}.zip
cd /opt/wastebin cd /opt/wastebin
$STD cargo build -q --release cargo build -q --release
msg_ok "Installed Wastebin" msg_ok "Installed Wastebin"
msg_info "Creating Service" msg_info "Creating Service"
@ -54,7 +53,6 @@ ExecStart=/root/.cargo/bin/cargo run --release --quiet
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl daemon-reload
systemctl enable -q --now wastebin.service systemctl enable -q --now wastebin.service
msg_ok "Created Service" msg_ok "Created Service"

Loading…
Cancel
Save