Hello, I have question to the combination of inotify and rsync. I want that my documents folder sync with other maschine if the host is up. So I find this soulution in net. The problem is, I write a script take it in /usr/local/bin cat /usr/local/bin/sync_docs.sh #!/usr/bin/env bash if ping -c 1 192.168.2.160 &> /dev/null; then while true; do inotifywait -r -e modify,attrib,close_write,move,create,delete /home/siefke/Dokumente rsync -avuq /home/siefke/Dokumente/ samsung:/home/siefke/Dokumente/ done fi and a systend service file. So but when the script run I become ever error siefke@192.168.2.160: Permission denied (publickey,password). So I place the script in home folder, place systemd service file in home and run it with systemd --user. The result is same. When run ssh samsung it works, when I run sync_docs.sh in shell it works. Why with systemd make it trouble? Thank you Silvio
Attachment:
pgpEuaALdHdls.pgp
Description: PGP signature