mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
feat(scripts): update script
This commit is contained in:
parent
65b8d102a7
commit
9e407e0814
1 changed files with 17 additions and 2 deletions
|
@ -76,15 +76,30 @@ msg_ok "Created dummy config file"
|
||||||
msg_info "Initializing gaming services to claim games for"
|
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)
|
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
|
||||||
|
|
||||||
|
msg_info "Creating daily cronjob for epic games"
|
||||||
|
(crontab -l ; echo "0 0 * * * cd /opt/freegamesclaimer && node epic-games") | crontab -
|
||||||
|
msg_ok "Cronjob created"
|
||||||
|
}
|
||||||
|
|
||||||
|
function setup_gog() {
|
||||||
|
$STD node gog
|
||||||
|
|
||||||
|
msg_info "Creating daily cronjob for gog"
|
||||||
|
(crontab -l ; echo "02 0 * * * cd /opt/freegamesclaimer && node gog") | crontab -
|
||||||
|
}
|
||||||
|
|
||||||
echo $CHOICES
|
echo $CHOICES
|
||||||
if [ ! -z "$CHOICES" ]; then
|
if [ ! -z "$CHOICES" ]; then
|
||||||
for CHOICE in $CHOICES; do
|
for CHOICE in $CHOICES; do
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
"EPIC")
|
"EPIC")
|
||||||
$STD node epic-games
|
setup_epic
|
||||||
;;
|
;;
|
||||||
"GOG")
|
"GOG")
|
||||||
$STD node gog
|
setup_gog
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported item $CHOICE!" >&2
|
echo "Unsupported item $CHOICE!" >&2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue