import initial - script de cancel automatique
darcs-hash:20020113111008-a279a-752cca2e22145cccb258746f07d27ab2dd5c3304.gz
This commit is contained in:
parent
131bb55988
commit
f96b76ef40
1 changed files with 39 additions and 0 deletions
39
news-cancel
Executable file
39
news-cancel
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
##
|
||||
## news-cancel
|
||||
##
|
||||
## Made by stransky
|
||||
## Login stransky <stransky@crans.org>
|
||||
##
|
||||
## 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 '<Message-ID>'"
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue