From f96b76ef40f2837e4df14445fe32f766bbebc4fa Mon Sep 17 00:00:00 2001 From: stransky Date: Sun, 13 Jan 2002 12:10:08 +0100 Subject: [PATCH] import initial - script de cancel automatique darcs-hash:20020113111008-a279a-752cca2e22145cccb258746f07d27ab2dd5c3304.gz --- news-cancel | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 news-cancel diff --git a/news-cancel b/news-cancel new file mode 100755 index 00000000..1f1b9cdc --- /dev/null +++ b/news-cancel @@ -0,0 +1,39 @@ +#!/bin/sh +## +## news-cancel +## +## Made by stransky +## Login stransky +## +## Started on dim 13 jan 2002 02:30:56 CET Nicolas STRANSKY +## Last update dim 13 jan 2002 11:52:27 CET Nicolas STRANSKY +## +## Script pour annuler un message de news. + + +CANCEL () { + echo -n 'throttling inn... ' + /bin/su - news -c "/usr/lib/news/bin/ctlinnd throttle 'article canceling'" + echo "canceling article $1" + /bin/su - news -c "/usr/lib/news/bin/ctlinnd cancel $1" + + echo -n 'starting inn... ' + /bin/su - news -c "/usr/lib/news/bin/ctlinnd go ''" + + } + + +case $1 in + \<*\>) + if [[ "X$UID" == "X0" ]] + then + CANCEL \'$1\' + else + echo "You must be root to launch this command." + exit 1 + fi + ;; + *) + echo "usage : news-cancel ''" + ;; +esac