diff --git a/lsyncd.sh b/lsyncd.sh index 002f0b1..fdd9315 100644 --- a/lsyncd.sh +++ b/lsyncd.sh @@ -3,27 +3,27 @@ yum install lsyncd -y; echo "settings { - logfile = "/var/log/lsyncd/lsyncd.log", - statusFile = "/tmp/lsyncd.stat", + logfile = $(echo '"/var/log/lsyncd/lsyncd.log"'), + statusFile = $(echo '"/tmp/lsyncd.stat"'), statusInterval = 1, } sync { default.rsync, - source = "/var/www/html/wp", - target = "backend2.floss.my.id:/var/www/html/wp", + source = $(echo '"/var/www/html/wp"'), + target = $(echo '"103.23.20.132:/var/www/html/wp"'), } sync { default.rsync, - source = "/etc/nginx/conf.d/blocks.conf", - target = "backend2.floss.my.id:/etc/nginx/conf.d/", + source = $(echo '"/etc/nginx/conf.d/"'), + target = $(echo '"103.23.20.132:/etc/nginx/conf.d/"'), } rsync = { update = true, perms = true, owner = true, - group = true," > /etc/lsyncd.conf; + group = true, }" > /etc/lsyncd.conf; systemctl restart lsyncd; systemctl status lsyncd; -ssh root@backend2.floss.my.id "nginx -t; nginx -s reload; systemctl status nginx;"; +ssh root@103.23.20.132 "nginx -t; nginx -s reload; systemctl status nginx;";