I created a small script
backup_files.sh and placed it in
#/bin/sh logfile=/media/verbatim/log date >> $logfile rsync -av /home/philipp/Documents /media/verbatim/ >> $logfile
I would like this script to be executed whenever the computer is rebooted or shut down, so I did the following:
sudo ln -s /etc/init.d/backup_files.sh /etc/rc0.d/backup_files.sh sudo ln -s /etc/init.d/backup_files.sh /etc/rc6.d/backup_files.sh
Moreover, I made the script executable:
sudo chmod +x /etc/init.d/backup_files.sh
I tried the script "manually" and it worked just fine. However, if I shutdown or reboot my computer, it is apparently not executed.
Does anybody see what I'm doing wrong?
Note: I'm using Xubuntu 11.10.