commit 3c61612b0b026341b6dba86dfd4d7946d337c4e3
parent 68fa148aefd8b98402fe2b18ab9f5c14334ec92c
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sat, 23 Nov 2019 17:33:57 +0100
remove old reminder scripts
use instead: https://a3nm.net/git/remailback/
Diffstat:
6 files changed, 0 insertions(+), 80 deletions(-)
diff --git a/find-reminder.sh b/find-reminder.sh
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-ID="$1"
-atq | cut -f1 | while read job;
-do
- FILE=`at -c $job | grep 'reminder-send.sh' | cut -d ' ' -f2`
- if [ -n "$FILE" ]
- then
- if grep "^In-Reply-To: $ID" ~/logs/reminder/$FILE > /dev/null
- then
- echo $job
- fi
- else
- echo "WARNING: no file found for job: $job"
- fi
-done
-
diff --git a/reminder-queue.sh b/reminder-queue.sh
@@ -1,9 +0,0 @@
-#!/usr/bin/zsh
-
-NAME=$({date +%s; echo --; basename `mktemp`} | tr -d '\n')
-cat > ~/logs/reminder/$NAME.origmail
-cat ~/logs/reminder/$NAME.origmail | ~/bin/reminder.pl > ~/logs/reminder/$NAME
-echo "$NAME `date +%s` $@" >> ~/logs/reminders
-(echo "reminder-send.sh $NAME" | at "$@" 2>> ~/logs/reminders) \
- && echo "Queued reminder $NAME for $@"
-
diff --git a/reminder-send.sh b/reminder-send.sh
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-cat ~/logs/reminder/$1 | /usr/sbin/sendmail -t
-mv ~/logs/reminder/$1 ~/logs/reminder/sent
-
diff --git a/reminder.pl b/reminder.pl
@@ -1,28 +0,0 @@
-#!/usr/bin/perl
-
-my $subject, $msgid, $body = 0;
-
-while (<>) {
- if ($body) {
- print;
- next;
- }
- chop;
- if (/^Subject: (.*)$/) {
- $subject = $1;
- }
- if (/^Message-[Ii][Dd]: (.*)$/) {
- $msgid = $1;
- }
- if (/^$/) {
- if (!$body) {
- print "From: Reminder <a3nm\@localhost>\n";
- print "To: Antoine Amarilli <a3nm\@localhost>\n";
- print "Subject: PING $subject\n";
- print "In-Reply-To: $msgid\n";
- print "\n";
- $body = 1;
- }
- }
-}
-
diff --git a/remove-reminder.sh b/remove-reminder.sh
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-set -x
-grep -i '^Message-id' | cut -d ' ' -f2 | while read l;
-do
- echo "will delete"
- ~/bin/find-reminder.sh $l
- echo "last chance to abort..."
- sleep 2
- atrm `~/bin/find-reminder.sh $l | cut -f1`
- #TODO remove the files from ~/logs/reminders
-done
diff --git a/show-reminder.sh b/show-reminder.sh
@@ -1,9 +0,0 @@
-#!/usr/bin/zsh
-
-# TODO: sometimes the message-ID is on a separate line after "Message-ID:"
-grep -i '^Message-id' | cut -d ' ' -f2 | while read l;
-do
- echo "Scheduled reminders for $l:"
- atq | grep "^`~/bin/find-reminder.sh $l` "
-done
-