install cron if missing
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 17 Sep 2011 11:05:51 +0000 (11:05 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 17 Sep 2011 11:05:51 +0000 (11:05 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@276 191e9f34-6774-4a6d-acfc-7664dacd4a2a

recepies/smart/dump.sh

index 9ea7eb0..4428dcf 100755 (executable)
@@ -1,7 +1,8 @@
-#!/bin/sh -e
+#!/bin/sh
 
-# cron
-# */30 *  * * *   /mnt/smart/dump.sh
+if [ ! -e /etc/cron.d/smart ] ; then
+       echo '*/30 *  * * *   /srv/sysadmin-cookbook/recepies/smart/dump.sh' > /etc/cron.d/smart
+fi
 
 cd /srv/sysadmin-cookbook/recepies/smart
 # awk '{ if ( $3 >= 2930266584 ) print $4 }'