You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
576 B

13 years ago
#!/bin/bash
UPDATE=$(db configuration getprop wpkg UpdatePackages || echo enabled)
if [ "$UPDATE" == "disabled" ]; then
exit 0
fi
13 years ago
USER=$(db configuration getprop wpkg RsyncUser || echo $(db configuration get DomainName))
13 years ago
PASS=$(db configuration getprop wpkg RsyncPassword || echo secret)
13 years ago
SERVER=$(db configuration getprop wpkg RsyncServer || echo not.set)
if [ "$PASS" == "secret" ]; then
/usr/bin/rsync -rtPz $SERVER /home/e-smith/files/shares/wpkg/files/
else
RSYNC_PASSWORD=$PASS /usr/bin/rsync -rtPz $USER@$SERVER /home/e-smith/files/shares/wpkg/files/
fi