I'm using Ubuntu 11.10.
I've written a script, that synchronises a directory in ~
with a directory on /dev/sda4
, using Unison. Before, I had this script running every five minutes with no problems, using crontab. Right now, I want to execute this script at startup, restart and shutdown only.
This is what the script looks like:
#!/bin/bash
unison -perms 0 -batch "/mnt/Data/Syncfolder/" "/home/myname/Syncfolder/"
I'd like the script to be run with mechanisms like Upstart, if possible. So I'd be happiest with a properly configured *.conf
file in /etc/init
.
Thanks in advance.