source: src-sh/lpreserver/backend/zfslistcron.sh @ 2b45e58

releng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since 2b45e58 was 2b45e58, checked in by Kris Moore <kris@…>, 11 months ago

Fix displaying correct lpreserver cron times when doing multiple pools

  • Property mode set to 100755
File size: 1.1 KB
Line 
1#!/bin/sh
2# ZFS functionality
3# Args $1 = jail-name
4# Args $2 = zfs directive
5#######################################################################
6
7# Source our functions
8PROGDIR="/usr/local/share/lpreserver"
9
10# Source our variables
11. /usr/local/share/pcbsd/scripts/functions.sh
12. ${PROGDIR}/backend/functions.sh
13
14echo "Datasets scheduled for snapshots:"
15echo "---------------------------------"
16for i in `grep "${PROGDIR}/backend/runsnap.sh" /etc/crontab | awk '{print $8}'`
17do
18   min=`grep "${PROGDIR}/backend/runsnap.sh ${i}" /etc/crontab | awk '{print $1}'`
19   hour=`grep "${PROGDIR}/backend/runsnap.sh ${i}" /etc/crontab | awk '{print $2}'`
20   count=`grep "${PROGDIR}/backend/runsnap.sh ${i}" /etc/crontab | awk '{print $9}'`
21   time="Min: $min Hour: $hour";
22   if [ "$min" = "0" -a "$hour" != '*' ] ; then time="daily@$hour" ; fi
23   if [ "$min" = "0" -a "$hour" = '*' ] ; then time="hourly" ; fi
24   if [ "$min" = "0,30" ] ; then time="30min" ; fi
25   if [ "$min" = '*/10' ] ; then time="10min" ; fi
26   if [ "$min" = '*/5' ] ; then time="5min" ; fi
27   echo "$i - $time - total: $count"
28done
Note: See TracBrowser for help on using the repository browser.