# Backup only one computer, from command line?
if [ $1 ] ; then
unixcomputers=$1
-fi;
-
+fi
#selve backupen
# krever at noen variabler er satt
chmod 600 *tgz #only for us
chmod 644 *sdx *idx 2>/dev/null #everyone can read
+ # Let the remote computer know that we ran a successful backup (for nagios)
+ ssh root@$computer touch $filesystem/.lastbackup
+
else
# Something wrong happened.
rm $TARFILE
sfilesystem=`echo $filesystem | tr '\/\$' '__'`
# Prepare storage area
- mkdir -m 755 -p $storagedir/$computer/$sfilesystem/{full,daglig} 2>/dev/null
+ mkdir -m 755 -p $storagedir/$computer/$sfilesystem/full 2>/dev/null
+ mkdir -m 755 -p $storagedir/$computer/$sfilesystem/daglig 2>/dev/null
echo $filesystem > ${storagedir}/${computer}/.${sfilesystem}.name
chmod 644 ${storagedir}/${computer}/.${sfilesystem}.name