Closed laggingreflex closed 7 years ago
This is definitely doable. I'd like to dust off this project a bit and get dependencies updated since it's been a while. Once that is complete then adding something like this should be fairly straightforward
Thought about this some more, and I think this is likely better executed by consumers than sicksync
as it opens up some security concerns. If a users' configuration is changed/compromised without them knowing then commands can be ran that could potentially be devastating. It's easy enough (I think) to write a small utility on the remote machine to do a file-system watch and run custom commands on it's own.
An example would be:
# Not 100% sure this works, but is a start
$ fswatch -o /etc/nginx | xargs nginx -s reload
Going back to first principles, sicksync
is really just an aide in file syncronization, and I feel that change orchestration is better handled in user land.
I'm open to discuss this more if I'm missing something!
I agree. I don't want this anymore.
Would it be desirable to have an option to execute a command on remote after a successful sync?
Like I'm currently syncing
/etc/nginx
and would like to havenginx -s reload
after each sync.