Changeset 9142399


Ignore:
Timestamp:
09/19/14 07:53:20 (5 weeks ago)
Author:
Bjarne Bertilsson <bjarne.bertilsson@…>
Branches:
master
Children:
1225925
Parents:
6ac0a37
Message:

Fixed bug. Cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/lpreserver/backend/zfslistcronscrub.sh

    rd94efae3 r9142399  
    1717do 
    1818   hour=`grep "${PROGDIR}/backend/runscrub.sh ${i}" /etc/crontab | awk '{print $2}'` 
    19    day=`grep "${PROGDIR}/backend/runscrub.sh ${i}" /etc/crontab | awk '{print $5}'` 
    20    month=`grep "${PROGDIR}/backend/runscrub.sh ${i}" /etc/crontab | awk '{print $3}'` 
    21    if [ "$day" = '*' -a "$month" = '*' ] ; then time="daily @ hour $hour" ; fi 
    22    if [ "$day" != '*' ] ; then time="weekly @ day $day" ; fi 
    23    if [ "$month" != '*' ] ; then time="monthly @ day $day @ hour $hour" ; fi 
     19   day_week=`grep "${PROGDIR}/backend/runscrub.sh ${i}" /etc/crontab | awk '{print $5}'` 
     20   day_month=`grep "${PROGDIR}/backend/runscrub.sh ${i}" /etc/crontab | awk '{print $3}'` 
     21   if [ "$housr" != '*' -a "$day_week" = '*' -a "$day_month" = '*' ] ; then time="daily @ hour $hour" ; fi 
     22   if [ "$day_week" != '*' ] ; then time="weekly @ day $day_week" ; fi 
     23   if [ "$month" != '*' ] ; then time="monthly @ day $day_month @ hour $hour" ; fi 
    2424   echo "$i - $time" 
    2525done 
    26  
    27 #monthly @ day 21 @ hour 13 
    28 #0       22      *       *       *       root    /usr/local/share/lpreserver/backend/runscrub.sh tank 
    29 #0       22      *       *       7       root    /usr/local/share/lpreserver/backend/runscrub.sh tank 
    30 #0       13      21       *       *      root    /usr/local/share/lpreserver/backend/runscrub.sh tank 
    31  
Note: See TracChangeset for help on using the changeset viewer.