Thanks for the advise!
That did it. The command is working fine now with the following setup:
currentuser="$(id -u -n)"
OPTS=(-q -avz --delete -e 'ssh -i /home/'$currentuser'/.ssh/id_rsa'
--rsync-path='sudo rsync')
SRC=(/etc/nginx/)
RSYNC_CMD=(rsync)
for h in balancer0{1..2} ; do
DST=$curren
On Fri, Jun 17, 2016 at 01:57:33PM -0700, dp...@realtruck.com wrote:
> OPTS=(-q -avz --delete -e \'ssh -i /home/$currentuser/.ssh/id_rsa\'
> --rsync-path=\'sudo rsync\')
You want:
OTPS=(-q -avz --delete -e "ssh -i /home/$currentuser/.ssh/id_rsa"
--rsync-path="sudo rsync")
OPTS+=( whatever
I have three servers. nginx00 (master nginx server) and nginx01 and nginx02
(slave nginx servers).
nginx00 is a staging environment that I do testing on. Once it goes live I run
a bash script that syncs the config files and restarts the nginx daemon. It's
working fine as root. However, I am