]> git.pld-linux.org Git - packages/fortune-mod.git/commitdiff
- skip fortune displays on non-interactive shells (cron for example)
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 12 Apr 2006 21:39:30 +0000 (21:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fortune-mod.sh -> 1.3

fortune-mod.sh

index daeb8d07a73a7f636992cceff998a8643fdcb2b3..c500eae46f9fec918fefa54ffb1054f03f050543 100644 (file)
@@ -1,3 +1,7 @@
+#!/bin/sh
+# skip fortunes on cron mails.
+tty -s || exit 0
+
 echo
 fortune -s
 echo
This page took 0.12963 seconds and 4 git commands to generate.