I have a custom made service file and I'm unable to run it. Here is the ExecStart line:
ExecStart=/bin/rsync --ignore-existing -rtvu /var/foo/foo/ /var/foo2/foo2 && /bin/chown nginx:nginx -R /var/foo2/foo2/ && /bin/chmod -R 777 /var/foo2/foo2/
Whenever I try to run the service, I get the following error message in the log files:
Sep 26 10:27:21 myserver rsync[9609]: Unexpected remote arg: nginx:nginx
Sep 26 10:27:21 myserver rsync[9609]: rsync error: syntax or usage error (code 1) at main.c(1214) [sender=3.0.9]
Any ideas what is the issue? The commands are running fine when I copy-paste them to my terminal