# # SYNC BETWEEN SERVERS # respawn start on started rsyslog stop on ( runlevel [06] or lliurex-sync-server-stop ) script NTP_COUNT=5 b=$NTP_COUNT HEARTBEAT_SLEEP=180 while : ; do for a in $(find /etc/lliurex-cap/ -maxdepth 1 -mindepth 1 -xtype d -printf "%P"); do lliurex-cap heartbeat "$a" & done if [ $b -eq $NTP_COUNT ] ; then llxcfg-cap ntpdate || true b=1 else b=$(($b + 1)) fi sleep $HEARTBEAT_SLEEP done end script