4
0
Fork 1
forked from encrypt/toot
MastodonMegafono/megafono_bot.sh

27 lines
376 B
Bash
Raw Normal View History

2019-02-20 12:28:23 +01:00
#!/bin/bash
2019-02-19 16:45:15 +01:00
#
# CONFIGURATION
#
2019-02-19 13:53:09 +01:00
2019-02-19 16:45:15 +01:00
# Interval between two consecutive posts
2019-02-19 13:53:09 +01:00
SLEEP_INTERVAL=3h
2019-02-19 16:45:15 +01:00
# File containing the toots to post
2019-02-21 10:52:30 +01:00
DATA_FILE=megafono.txt
2019-02-19 16:45:15 +01:00
#
# CONFIGURATION END
#
2019-02-19 13:57:34 +01:00
while :
2019-02-19 13:53:09 +01:00
do
2019-02-19 13:57:34 +01:00
# Last line should be empty, so we dont need an additional read here
# after the while loop
while read line
do
./toot.sh $line
2019-02-19 13:57:34 +01:00
sleep ${SLEEP_INTERVAL}
2019-02-19 16:45:15 +01:00
done < ${DATA_FILE}
2019-02-19 13:57:34 +01:00
done