#!/bin/bash
#Crea le cartelle utili
#cd /home/administrator/
#mkdir contenitore
#cd contenitore/
#mkdir damaster
#Crea il tarball e lo sposta
cd /var/www/html/
tar cvzf copia-`date`.tar.gz allegati_preventivi/
mv copia-`date`.tar.gz /home/administrator/contenitore/damaster/
#Masterizza
cd /home/administrator/contenitore/
TRACCE=`cdrecord -msinfo dev=1,0,0`
echo $TRACCE
IMMA=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'img-`date`\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
echo $IMMA
mkisofs -R -o $IMMA -C $TRACCE -M /dev/cdrom damaster/
cdrecord -multi -v speed=2 dev=1,0,0 -data $IMMA
#A fine masterizzazione cancella
cd /home/administrator/contenitore/
rm $IMMA
cd damaster/
rm copia-`date`.tar.gz
|