Last active
December 15, 2015 16:59
-
-
Save codersofthedark/5292967 to your computer and use it in GitHub Desktop.
Start two instance of tornado server
This file contains 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
t=$(date +%s) | |
s=3600 | |
t=$(expr $t - $s) | |
filename="analytics.log."$(date -d @$t +%Y-%m-%d_%H) | |
echo $filename | |
networkfilename=$(date +%Y%m%d%H)-$(hostname).log | |
echo $networkfilename | |
python mtornado.py & | |
sleep 3900 | |
while true; do | |
scp -i ~/.ssh/key.pem logs/$filename [email protected]:logs/$networkfilename | |
sleep 3600 | |
t=$(date +%s) | |
s=3600 | |
t=$(expr $t - $s) | |
filename="analytics.log."$(date -d @$t +%Y-%m-%d_%H) | |
networkfilename=$(date +%Y%m%d%H)-$(hostname).log | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment