Skip to content

Instantly share code, notes, and snippets.

@Skinner927
Created October 27, 2014 14:34
Show Gist options
  • Save Skinner927/207e9febf1e0b8489f4a to your computer and use it in GitHub Desktop.
Save Skinner927/207e9febf1e0b8489f4a to your computer and use it in GitHub Desktop.
Upstart job for sshfs
start on (local-filesystems and net-device-up IFACE!=lo)
task
script
echo "start on: $(date)" > /home/user/automount_log.txt
while true; do ping -c1 172.16.76.50 &> /dev/null && break; done
sshfs -o allow_other,uid=$(id -u),gid=$(id -g),delay_connect [email protected]:user/git/website-user/ /var/www/website_user >> /home/user/automount_log.txt 2>&1
echo "end on: $(date)" >> /home/user/automount_log.txt
end script
@Skinner927
Copy link
Author

Skinner927 commented Sep 14, 2020

https://github.com/axkibe/lsyncd is another alternative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment