Build the Luit/dogebot binary (I prefer to do so in a Docker container) for ARM:
$ docker run -v /tmp:/mnt/tmp -it debian:testing
docker$ apt-get update && apt-get install -y git golang
# Ensure build dependencies are available locally
docker$ go get github.com/Luit/dogebot/src/dogebot
docker$ git clone https://github.com/Luit/dogebot
docker$ cd dogebot/src/dogebot
# Build a Raspberry Pi binary
# https://www.thepolyglotdeveloper.com/2017/04/cross-compiling-golang-applications-raspberry-pi/
docker$ env GOOS=linux GOARCH=arm GOARM=5 go build
docker$ cp dogebot /mnt/tmp/
docker$ exit
$ scp /tmp/dogebot pi@hostname:
Then copy dogebot.sh
to ~
(you'll need to tweak the script if you want it/the binary
to live somewhere other than your home directory), and add the following to your crontab:
*/5 * * * * bash /home/pi/dogebot.sh [YOUR SLACK API KEY]
http://mywiki.wooledge.org/ProcessManagement suggests some better alternatives to scheduled polling with cron. Even the while-loop approach would probably be sufficient.