diff options
Diffstat (limited to 'nfs/scripts/image_capture.sh')
-rw-r--r-- | nfs/scripts/image_capture.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nfs/scripts/image_capture.sh b/nfs/scripts/image_capture.sh index 7c23c30..ae72320 100644 --- a/nfs/scripts/image_capture.sh +++ b/nfs/scripts/image_capture.sh @@ -2,9 +2,9 @@ # Should only started from autorun.sh, it defines some helper functions and variables) # Prepare capture -year=$(date +%Y) -monthday=$(date +%m-%d) -outdir="$imagedir/$year/$hostname/$monthday" +last=$(date +%Y%m%d) +lastfile="$imagedir/$hostname/last" +outdir="$imagedir/$hostname/$last" if [ -d "$outdir" ] then rm -r "$outdir" @@ -20,7 +20,10 @@ env setterm -bold off echo_color green black "$scriptdir/image_capture_${hostname}.sh script will run on tty1 now" pause10s + +# Do the work then mark image in "last" after completion source $scriptdir/image_capture_${hostname}.sh +echo $last > $lastfile date >>logs/date.log |