indention

This commit is contained in:
CanbiZ 2025-03-06 13:57:45 +01:00
parent a125be50cf
commit 6ce4a68318
2 changed files with 45 additions and 43 deletions

View File

@ -1,12 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck # Copyright (c) 2021-2025 community-scripts ORG
# Author: tteck # Author: MickLesk (Canbiz)
# Co-Author: MickLesk (Canbiz)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/matze/wastebin # Source: https://github.com/matze/wastebin
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color color
verb_ip6 verb_ip6
catch_errors catch_errors
@ -15,19 +14,22 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y curl $STD apt-get install -y \
$STD apt-get install -y sudo curl \
$STD apt-get install -y mc sudo \
mc
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing Wastebin" msg_info "Installing Wastebin"
temp_file=$(mktemp)
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) }')
wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst wget -q https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.zip -O $temp_file
tar -xf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst unzip -q $temp_file
rm -rf wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst rm -rf wastebin_${RELEASE}_x86_64-unknown-linux-musl.zip
mkdir -p /opt/wastebin mkdir -p /opt/wastebin
mv wastebin /opt/wastebin/ mv wastebin /opt/wastebin/
chmod +x /opt/wastebin/wastebin chmod +x /opt/wastebin/wastebin
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
msg_ok "Installed Wastebin" msg_ok "Installed Wastebin"
msg_info "Creating Service" msg_info "Creating Service"
@ -43,7 +45,7 @@ ExecStart=/opt/wastebin/wastebin
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now wastebin.service systemctl enable -q --now wastebin
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh