From 153db66224cd3851f073485f2e3ef3ee32bc9bc2 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Fri, 16 Jun 2023 10:34:55 +0200 Subject: [PATCH] Added ability to disable loggin of the console. --- config.txt.sample | 3 ++- start.sh | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/config.txt.sample b/config.txt.sample index 0a0f54a..456737b 100644 --- a/config.txt.sample +++ b/config.txt.sample @@ -1,4 +1,5 @@ interval=300 schedule=("01:00" "03:15" "05:30" "07:45" "10:00" "12:15" "14:30" "16:45" "19:00" "21:15") retries=3 -webhook='' \ No newline at end of file +webhook='' +log_all=0 \ No newline at end of file diff --git a/start.sh b/start.sh index 4bd1d15..d77b44d 100644 --- a/start.sh +++ b/start.sh @@ -132,9 +132,17 @@ do fi else if grep -q "container=lxc" /proc/1/environ || grep -q "container=lxc-libvirt" /proc/1/environ; then - gnome-terminal -- sh -c "cd Microsoft-Rewards-bot && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --virtual-display --print-to-webhook --accounts-file $vpn.json --discord $webhook; exit; exec bash" & + if [[ "$log_all" == 1 ]]; then + gnome-terminal -- sh -c "cd Microsoft-Rewards-bot && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --virtual-display --print-to-webhook --accounts-file $vpn.json --discord $webhook; exit; exec bash" & + else + gnome-terminal -- sh -c "cd Microsoft-Rewards-bot && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --virtual-display --accounts-file $vpn.json --discord $webhook; exit; exec bash" & + fi else - gnome-terminal -- sh -c "cd Microsoft-Rewards-bot && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --print-to-webhook --accounts-file $vpn.json --discord $webhook; exit; exec bash" & + if [[ "$log_all" == 1 ]]; then + gnome-terminal -- sh -c "cd Microsoft-Rewards-bot && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --print-to-webhook --accounts-file $vpn.json --discord $webhook; exit; exec bash" & + else + gnome-terminal -- sh -c "cd Microsoft-Rewards-bot && python ms_rewards_farmer.py --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --accounts-file $vpn.json --discord $webhook; exit; exec bash" & + fi fi fi read -t 2