You are not logged in.
Pages: 1
Hi, I have a very simple rsync script which root runs everyday at 8AM. I use that script to backup in my external HDD. Right now the script is as such that it will write an error log in my /home directory if the media is not plugged. I want to display a warning message in a popup window, maybe in gtk, asking the user to plugin the HDD just 5 minutes before the backup begins. I've no idea how to do this. Here is my backup script:
#!/bin/bash
check="/media/backup"
if [ -d $check ]; then
rsync --verbose --progress --stats --compress \
--recursive --times --delete-excluded --links --delete \
--exclude-from=/home/pdg/.rsync/exclude \
/ /media/backup/arch-backup/
echo "Rsync Backup Completed!" >> /home/pdg/backup.log
echo "EXITING" >> /home/pdg/backup.log
echo `date` >> /home/pdg/backup.log
exit 0
else
echo "Plugin and Mount your USB backup drive!" >> /home/pdg/error.log
echo "EXITING" >> /home/pdg/error.log
echo `date` >> /home/pdg/error.log
exit 1
fi
I want the message box/dialog to appear just 5minutes before 8AM. So, I'll add it to cron, but I'd appreciate any help regarding how to proceed on making such a dialog box which the cron can trigger.
Regards
Last edited by sHyLoCk (2010-01-02 08:17:25)
Offline
zenity.
Offline
Thanks I'll check it out. I was browsing through the gtk documentation trying to figure this out. Crazy
zenity --info --text=Please\ Plugin\ your\ /media/backup\ Drive,\ Backup\ starts\ in\ 5\ minutes!
Last edited by sHyLoCk (2010-01-02 08:21:55)
Offline
Pages: 1