From 146924694c0b4d8033953bfef15395fe58159d9c Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 4 Sep 2016 16:28:38 +1000 Subject: [PATCH] Added simple file posting bot using mgpost --- utils/rascalbot.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 utils/rascalbot.sh diff --git a/utils/rascalbot.sh b/utils/rascalbot.sh new file mode 100755 index 0000000..498000c --- /dev/null +++ b/utils/rascalbot.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# BEGIN CONFIGURATION-------------------------------------------------- +MGPOST=/home/pi/MagickaBBS/utils/mgpost/mgpost +NODE=21:1/140 +AREA=/home/pi/MagickaBBS/msgs/fsxnet/fsx_bot +ORIGINTXT="Underland - telnet://andrew.homeunix.org:2023" +FROM=rascal-bot +SEMAPHORE=/home/pi/MagickaBBS/echomail.out +# END CONFIGURATION---------------------------------------------------- + +SUBJECT=`head -1 $1` +TMP=/tmp/$RANDOM-rascal + +mkdir -p $TMP + +tail -n +2 $1 | cat > $TMP/rascal.txt + +echo "" >> $TMP/rascal.txt +echo "--- rascal-bot (v0.1)" >> $TMP/rascal.txt +echo " * Origin: $ORIGINTXT ($NODE)" >> $TMP/rascal.txt + +$MGPOST e $TMP/rascal.txt "$AREA" "$FROM" "$SUBJECT" $NODE +touch $SEMAPHORE + +rm -rf $TMP