diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2017-08-20 18:07:17 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2017-08-20 18:07:17 +0200 |
| commit | b5898106657c3fac6ae4b8eba1516e74dd43054c (patch) | |
| tree | e635bd1817e58b627e54fd294ae1cb71bb386c29 | |
| parent | ff93952d178eba2ba90c10b1c26905eccb63263b (diff) | |
| download | geldschieberbot-b5898106657c3fac6ae4b8eba1516e74dd43054c.tar.gz geldschieberbot-b5898106657c3fac6ae4b8eba1516e74dd43054c.zip | |
add run.sh script
| -rw-r--r-- | Readme.md | 5 | ||||
| -rwxr-xr-x | run.sh | 16 |
2 files changed, 18 insertions, 3 deletions
@@ -11,11 +11,10 @@ Geldschieberbot is configured with a set of Environment variables: * GSB_GROUP_ID the signal group_id you want to serve * GSB_STORE_PATH the directory where Geldschieberbot stores the balance and the useres * GSB_SEND_CMD the command Geldschieberbot uses to send replies +* GSB_USER the mobile number signal-cli should receive messages with Geldschieberbot must be fed with signal messages recieved by signal-cli. -Just pipe the output of signal-cli receive through Geldschieberbot in a cron -job and you are good to go. - +Just execute run.sh in tmux and you should be fine. Happy Geldschieben! @@ -0,0 +1,16 @@ +#!/bin/bash + +i=1 +a=1 +while [ true ] +do + sleep 30 + echo $i + signal-cli -u $GSB_USER receive | tee msg$i.log | python3 geldschieberbot.py + i=`expr $i + 1` + + if [[ $i == 5000 ]] + then + tar cfz msgs$a.tar.gz msg*.log && rm msg*.log && i=1 && a=`expr $a + 1` + fi +done |
