Allow passwordless rsync and no auto updates of packages

tags/0.0.1
Daniel Berteaud 13 years ago
parent b5a2fcbc5b
commit 33f506d025
  1. 12
      root/etc/e-smith/events/actions/wpkg-update-packages

@ -1,7 +1,17 @@
#!/bin/bash #!/bin/bash
UPDATE=$(db configuration getprop wpkg UpdatePackages || echo enabled)
if [ "$UPDATE" == "disabled" ]; then
exit 0
fi
USER=$(db configuration getprop wpkg RsyncUser || echo $(db configuration get DomainName)) USER=$(db configuration getprop wpkg RsyncUser || echo $(db configuration get DomainName))
PASS=$(db configuration getprop wpkg RsyncPassword || echo secret) PASS=$(db configuration getprop wpkg RsyncPassword || echo secret)
SERVER=$(db configuration getprop wpkg RsyncServer || echo not.set) SERVER=$(db configuration getprop wpkg RsyncServer || echo not.set)
RSYNC_PASSWORD=$PASS /usr/bin/rsync -rtPz $USER@$SERVER /home/e-smith/files/shares/wpkg/files/ 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

Loading…
Cancel
Save