mirror of https://github.com/tteck/Proxmox.git
feat(scripts): update script
This commit is contained in:
parent
74731f403a
commit
cdb3a7edaa
|
@ -52,26 +52,63 @@ function default_settings() {
|
||||||
echo_default
|
echo_default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setup_services(){
|
||||||
|
msg_info "Initializing gaming services to claim games for"
|
||||||
|
CHOICES=$(whiptail --title "Select game services" --separate-output --checklist "Select services" 20 78 4 "EPIC" "Epic Games" OFF "GOG" "Good Old Games" OFF 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
echo $CHOICES
|
||||||
|
if [ ! -z "$CHOICES" ]; then
|
||||||
|
for CHOICE in $CHOICES; do
|
||||||
|
case $CHOICE in
|
||||||
|
"EPIC")
|
||||||
|
$STD node epic-games
|
||||||
|
;;
|
||||||
|
"GOG")
|
||||||
|
$STD node gog
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported item $CHOICE!" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
msg_ok "Services initialized: ${CHOICES}"
|
||||||
|
}
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
#if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
if [[ ! -d /opt/freegamesclaimer ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
#msg_info "Updating $APP"
|
msg_info "Updating $APP"
|
||||||
#systemctl stop overseerr
|
|
||||||
#cd /opt/overseerr
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE \ Setup service" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
||||||
#output=$(git pull)
|
"1" "Update" ON \
|
||||||
#git pull &>/dev/null
|
"2" "Setup a service" OFF \
|
||||||
#if echo "$output" | grep -q "Already up to date."
|
3>&1 1>&2 2>&3)
|
||||||
#then
|
|
||||||
# msg_ok " $APP is already up to date."
|
case $CHOICE in
|
||||||
# systemctl start overseerr
|
"1")
|
||||||
# exit
|
cd /opt/freegamesclaimer || exit
|
||||||
#fi
|
output=$(git pull)
|
||||||
#yarn install &>/dev/null
|
git pull &>/dev/null
|
||||||
#yarn build &>/dev/null
|
if echo "$output" | grep -q "Already up to date."
|
||||||
#systemctl start overseerr
|
then
|
||||||
#msg_ok "Updated $APP"
|
msg_ok "$APP is already up to date."
|
||||||
msg_ok "Not implemented yet"
|
systemctl start overseerr
|
||||||
exit
|
exit
|
||||||
|
fi
|
||||||
|
$STD npm install
|
||||||
|
$STD npx playwright install firefox --with-deps
|
||||||
|
msg_ok "Updated $APP - If needed, run update again to setup the gaming services"
|
||||||
|
;;
|
||||||
|
"2")
|
||||||
|
setup_services
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported item $CHOICE!" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
|
|
Loading…
Reference in New Issue