Update peanut.sh

tweak
This commit is contained in:
tteckster 2024-06-13 22:36:43 -04:00 committed by GitHub
parent 5886f1240e
commit 0e284df495
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 7 deletions

View File

@ -9,17 +9,17 @@ source <(curl -s https://raw.githubusercontent.com/remz1337/Proxmox/remz/misc/bu
function header_info { function header_info {
clear clear
cat <<"EOF" cat <<"EOF"
____ __ ____ _ ____ ________
/ __ \___ ____ _____ __ __/ /_ / __ \___ ____ _/ | / / / / /_ __/
/ /_/ / _ \/ __ `/ __ \/ / / / __/ / /_/ / _ \/ __ `/ |/ / / / / / /
/ ____/ __/ /_/ / / / / /_/ / /_ / ____/ __/ /_/ / /| / /_/ / / /
/_/ \___/\__,_/_/ /_/\__,_/\__/ /_/ \___/\__,_/_/ |_/\____/ /_/
EOF EOF
} }
header_info header_info
echo -e "Loading..." echo -e "Loading..."
APP="Peanut" APP="PeaNUT"
var_disk="4" var_disk="4"
var_cpu="2" var_cpu="2"
var_ram="2048" var_ram="2048"
@ -58,7 +58,7 @@ function update_script() {
if [[ ! -f /etc/systemd/system/peanut.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ ! -f /etc/systemd/system/peanut.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
RELEASE=$(curl -sL https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep '"tag_name":' | cut -d'"' -f4) RELEASE=$(curl -sL https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating $APP LXC" msg_info "Updating $APP to ${RELEASE}"
systemctl stop peanut systemctl stop peanut
wget -qO peanut.tar.gz https://api.github.com/repos/Brandawg93/PeaNUT/tarball/${RELEASE} wget -qO peanut.tar.gz https://api.github.com/repos/Brandawg93/PeaNUT/tarball/${RELEASE}
tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1 tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1