aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.sh.sample16
-rwxr-xr-xrun.sh32
2 files changed, 0 insertions, 48 deletions
diff --git a/config.sh.sample b/config.sh.sample
deleted file mode 100644
index a954658..0000000
--- a/config.sh.sample
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# Group the bot should monitor
-export GSB_GROUP_ID=""
-# Path where the bots data should be stored
-export GSB_STORE_PATH="~/geldschieberbot"
-# Command the bot uses to send responses
-export GSB_SEND_CMD=""
-# Signal user the bot should use
-export GSB_USER=""
-
-# create GSB_STORE_PATH
-if [[ ! -e "$GSB_STORE_PATH" ]]
-then
- mkdir -p $GSB_STORE_PATH 2>/dev/null
-fi
diff --git a/run.sh b/run.sh
deleted file mode 100755
index 6a10895..0000000
--- a/run.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-# Source config.sh if it is available
-[[ -f config.sh ]] && source config.sh
-
-# Create dir for all your received messages
-mkdir -p msgs
-
-# Is GSB_USER set ?
-test -z "$GSB_USER" && >&2 echo "GSB_USER not set!" && exit 1
-
-old_week=$(date +%U)
-week=$(date +%U)
-
-while [ true ]
-do
- sleep 30
-
- d=$(date -Ins)
- week=$(date +%U)
-
- signal-cli -u ${GSB_USER} receive --json | tee msgs/msg${d}.log | python3 geldschieberbot.py
-
- # only keep non empty logs
- [[ $(du msgs/msg${d}.log | cut -f 1) == 0 ]] && rm msgs/msg${d}.log
-
- # make a tar for every week
- if [[ ${old_week} != ${week} ]]
- then
- tar cfz msgs/msgs$(date +%U-%g).tar.gz msgs/msg*.log && rm msgs/msg*.log && old_week=${week}
- fi
-done