#!/bin/sh
-export RSYNC_PASSWORD="<%= @passwords["rsync"] %>"
export GEODNS_SERVERS="<%= @geoservers.join(" ") %>"
-export PINGDOM_USERNAME="pingdom@openstreetmap.org"
-export PINGDOM_PASSWORD="<%= @passwords["pingdom"] %>"
export STATUSCAKE_USERNAME="OpenStreetMap"
export STATUSCAKE_APIKEY="<%= @passwords["statuscake"] %>"
+export PATH=/usr/local/bin:$PATH
-make --quiet --jobs --directory=/var/lib/dns --assume-new=bin/mkgeo update > /dev/null
+lockfile-create --use-pid /var/lib/dns/update || exit 1
+
+make --quiet --jobs --directory=/var/lib/dns update_primary > /dev/null
+
+lockfile-remove /var/lib/dns/update