From 4457ba89113b859430fc1d0cd4b4e642f64aead6 Mon Sep 17 00:00:00 2001 From: Matan Sarsha Date: Sat, 31 Aug 2024 10:54:55 +0300 Subject: [PATCH] feat(scripts): add free games claimer script --- ct/free-games-claimer.sh | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/ct/free-games-claimer.sh b/ct/free-games-claimer.sh index 689b744e..65c281a2 100644 --- a/ct/free-games-claimer.sh +++ b/ct/free-games-claimer.sh @@ -18,12 +18,12 @@ EOF } header_info echo -e "Loading..." -APP="free-games-claimer" +APP="Free Games Claimer" var_disk="8" var_cpu="2" var_ram="2048" -var_os="debian" -var_version="12" +var_os="ubuntu" +var_version="22.04" variables color catch_errors @@ -54,22 +54,22 @@ function default_settings() { function update_script() { header_info -#if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -#msg_info "Updating $APP" -#systemctl stop overseerr -#cd /opt/overseerr -#output=$(git pull) -#git pull &>/dev/null -#if echo "$output" | grep -q "Already up to date." -#then -# msg_ok " $APP is already up to date." -# systemctl start overseerr -# exit -#fi -#yarn install &>/dev/null -#yarn build &>/dev/null -#systemctl start overseerr -#msg_ok "Updated $APP" +if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP" +systemctl stop overseerr +cd /opt/overseerr +output=$(git pull) +git pull &>/dev/null +if echo "$output" | grep -q "Already up to date." +then + msg_ok " $APP is already up to date." + systemctl start overseerr + exit +fi +yarn install &>/dev/null +yarn build &>/dev/null +systemctl start overseerr +msg_ok "Updated $APP" msg_info "Not implemented yet" exit }