Revert Wastebin changes

No arm64 binaries available
This commit is contained in:
Sam Heinz
2024-08-08 06:57:34 +10:00
parent 43a3e0ef23
commit f95165b5ce

View File

@@ -15,23 +15,33 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y wget
$STD apt-get install -y ca-certificates
$STD apt-get install -y openssh-server
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y --no-install-recommends \
build-essential \
unzip \
curl \
sudo \
git \
make \
mc \
wget \
ca-certificates \
openssh-server
msg_ok "Installed Dependencies"
msg_info "Installing Wastebin"
msg_info "Installing Rust (Patience)"
$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y
source ~/.cargo/env
msg_ok "Installed Rust"
msg_info "Installing Wastebin (Patience)"
RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst
tar -xf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst
rm -rf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst
mkdir -p /opt/wastebin
mv wastebin /opt/wastebin/
chmod +x /opt/wastebin/wastebin
wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv wastebin-${RELEASE} /opt/wastebin
rm -R ${RELEASE}.zip
cd /opt/wastebin
cargo build -q --release
msg_ok "Installed Wastebin"
msg_info "Creating Service"
@@ -41,8 +51,9 @@ Description=Start Wastebin Service
After=network.target
[Service]
User=root
WorkingDirectory=/opt/wastebin
ExecStart=/opt/wastebin/wastebin
ExecStart=/root/.cargo/bin/cargo run --release --quiet
[Install]
WantedBy=multi-user.target
@@ -56,4 +67,4 @@ customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
msg_ok "Cleaned"