Configuring Scheduled Synchronization
Configure the synchronization task to run every minute using cron:
- Open the crontab
file:
# crontab -e
- Add the following line to the file to schedule the synchronization task to run every
minute:
* * * * * /usr/local/sbin/csync2 -x
- Save the file.
Create a script to immediately sync the configuration files when any configuration
file is updated:
- Create the script
file:
# vi /etc/xiraid/config_update_handler.sh
- Paste the following content into the file:
#!/usr/bin/bash /usr/local/sbin/csync2 -xv
Tip:If necessary, update the path to csync2 in the script.
- Make the script
executable:
# chmod +x /etc/xiraid/config_update_handler.sh