extsay-ng/extsay.sh
changeset 23 cf95a475825c
parent 22 b6b45c2eb022
child 24 81cbb47f1aa6
--- a/extsay-ng/extsay.sh	Fri Apr 02 23:45:20 2010 +0200
+++ b/extsay-ng/extsay.sh	Sat Apr 03 00:50:17 2010 +0200
@@ -30,10 +30,12 @@
 # Send the message using MCabber's pipe
 if [ -s $tf ]; then
     cmd="say_to -f $tf $jid"
-    echo $cmd >> $FIFOPATH
+else
+    cmd="echo [extsay] The file has not been modified.  Message cancelled."
 fi
+echo $cmd >> $FIFOPATH
 
 # Do not remove the file too soon
-(sleep 20 ; rm $tf)&
+setsid sh -c "cd / && sleep 20 && rm $tf & :" /dev/null 2>&1 < /dev/null
 
 exit 0