[omd-commits] OMD Git: omd: crontab init script: Exit with 0 when no crontab to remove

git version control git at mathias-kettner.de
Tue Dec 16 14:17:19 CET 2014


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

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Tue Dec 16 14:17:16 2014 +0100
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Tue Dec 16 14:17:16 2014 +0100

crontab init script: Exit with 0 when no crontab to remove

---

 packages/maintenance/skel/etc/init.d/crontab |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/maintenance/skel/etc/init.d/crontab b/packages/maintenance/skel/etc/init.d/crontab
index e210061..517e816 100644
--- a/packages/maintenance/skel/etc/init.d/crontab
+++ b/packages/maintenance/skel/etc/init.d/crontab
@@ -35,8 +35,10 @@ case "$1" in
         ;;
 
     stop)
-	echo "Removing Crontab..."
-	$CRONTAB $CRONTAB_OPTS -r
+        echo -n "Removing Crontab..."
+        $CRONTAB $CRONTAB_OPTS -r || exit 0
+        echo OK
+        exit 0
         ;;
 
     restart|reload)



More information about the omd-commits mailing list