feat(scripts): exit node

This commit is contained in:
Matan Sarsha 2024-08-31 23:28:04 +03:00
parent a3fd1ae8b0
commit 422d2d71fc

View file

@ -77,19 +77,27 @@ 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)
function setup_epic() {
$STD node epic-games || exit
$STD LOGIN_TIMEOUT=30 node epic-games || success=false
msg_info "Creating daily cronjob for epic games"
(crontab -l ; echo "0 0 * * * cd /opt/freegamesclaimer && node epic-games") | crontab -
msg_ok "Cronjob created"
if [ "$success" == false ]; then
echo "gog failed"
else
msg_info "Creating daily cronjob for epic games"
(crontab -l ; echo "0 0 * * * cd /opt/freegamesclaimer && node epic-games") | crontab -
msg_ok "Cronjob created"
fi
}
function setup_gog() {
$STD node gog || exit
$STD LOGIN_TIMEOUT=30 node gog || success=false
msg_info "Creating daily cronjob for gog"
(crontab -l ; echo "02 0 * * * cd /opt/freegamesclaimer && node gog") | crontab -
msg_ok "Cronjob created"
if [ "$success" == false ]; then
echo "gog failed"
else
msg_info "Creating daily cronjob for gog"
(crontab -l ; echo "02 0 * * * cd /opt/freegamesclaimer && node gog") | crontab -
msg_ok "Cronjob created"
fi
}
echo $CHOICES