I have wakeup script that runs when the system wakes up (Arch linux)
$ cat /usr/lib/pm-utils/sleep.d/example #!/bin/bash case "$1" in resume) echo "hey I just got resumed!" /usr/bin/bash /home/user/bin/wakeup_script esac
$ cat bin/wakeup_script #!/bin/bash /usr/bin/touch /home/user/testwake.txt /usr/bin/rsync -vaz firstname.lastname@example.org:/home/user/downloads/test.txt /mnt/data/ /home/user/bin/mnt d
you can see that the script "wakeup_script" contains three bash script. When the system wakes up, the first and third script runs very well but rsync never worked, I tried scp, it doesn't work again! what's wrong here?
when I execute the same "wakeup_script" in a shell, the rsync does work but it doesn't get executed when the system wakes up!!
$ /usr/bin/bash /home/user/bin/wakeup_script