#!/bin/sh while inotifywait -qq -r ./ -e create,delete,modify; do rsync -a --exclude='.git/' --exclude='watch' --filter=":- .gitignore" ./ /srv/social/ sudo systemctl restart social.service done