Thank you for this.
I have updated it with some minor things for our environment that possibly could be useful for others aswell, so attaching my updated version. Basicly, then changes are:
- Changed names from primary/secondary to master/slave(s)
- Added support for multiple slaves
- Added fix to handle empty version or build
- Changed behaviour to delete package on slave if same version but build mismatch [1]
[1]: From my experience, when people forget to increase the version, and the build is increased (it increased automatically), the distsrv won't replicate the updated package. In this case, it seems to be a good idea to delete the package on the slave, and let master re-sync it.
Regards,
Anders Synstad
Basefarm AS