Last active
January 14, 2021 08:31
-
-
Save iapyeh/7c17b8b7684557f495bd50952586f34f to your computer and use it in GitHub Desktop.
getting password and switching between debug mode and productive mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# getdatafromemail.py read password by password = sys.stdin.read() | |
if [ -z "$1" ] || [ "productive" != "$1" ]; then | |
# run by "run.getdatafromemail.sh" or "run.getdatafromemail.sh whatever_except_productive" | |
password=PASSWORD | |
echo "----debugging mode----" | |
if [ $password = "PASSWORD" ]; then | |
echo "entr password to receive email" | |
read -s password | |
else | |
echo $password | python3 getdatafromemail.py | |
fi | |
else | |
# run by "run.getdatafromemail.sh productive" | |
echo "----productive mode----" | |
echo "entr password to receive email" | |
read -s password | |
echo $password | nohup python3 getdatafromemail.py > /tmp/log.getdatafromemail.txt 2>&1 & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment