summaryrefslogtreecommitdiff
path: root/nfs/scripts/image_capture.sh
blob: 53c75adaec8135c4e432c82c6cc6bf12085bd6c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/busybox sh
# 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"

if [ -d "$outdir" ]
then	rm -r "$outdir"
fi
mkdir -p "$outdir"
cd "$outdir"
mkdir logs
date >logs/date.log

# Start the capture using the customized script (image_capture_<hostname>.sh)
source $scriptdir/image_capture_${hostname}.sh

date >>logs/date.log