[omd-commits] OMD Git: omd: maintenance: added status section to crontab init script

git version control git at mathias-kettner.de
Thu Dec 23 09:03:12 CET 2010


Module: omd
Branch: master
Commit: f3c7817b366d13e1c3f8de2c425d4439b5e40e0c
URL:    http://omdistro.org/projects/omd/repository/revisions/f3c7817b366d13e1c3f8de2c425d4439b5e40e0c

Author: Joerg Linge <pitchfork at pnp4nagios.org>
Date:   Thu Dec 16 13:24:50 2010 +0100

maintenance: added status section to crontab init script

---

 packages/maintenance/skel/etc/init.d/crontab |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/packages/maintenance/skel/etc/init.d/crontab b/packages/maintenance/skel/etc/init.d/crontab
index 3832f3b..fd4f30c 100644
--- a/packages/maintenance/skel/etc/init.d/crontab
+++ b/packages/maintenance/skel/etc/init.d/crontab
@@ -36,7 +36,16 @@ case "$1" in
         $0 stop
         $0 start
         ;;
-
+    status)
+        $CRONTAB -u $USER -l >/dev/null 2>&1
+        if [ $? -eq 0 ]; then
+            echo "crontab initalized"
+            exit 0
+        else
+            echo "crontab is empty"
+            exit 1
+        fi
+        ;;
     *)
         echo "Usage: crontab {start|stop|restart|reload|status}"
         exit 1



More information about the omd-commits mailing list