Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run command only after a change #233

Open
totosh opened this issue Aug 12, 2021 · 2 comments
Open

Run command only after a change #233

totosh opened this issue Aug 12, 2021 · 2 comments

Comments

@totosh
Copy link

totosh commented Aug 12, 2021

LOCAL_RUN_AFTER_CMD and REMOTE_RUN_AFTER_CMD options are used even if there is no change with rsync.
Should be interesting to have an option as RUN_AFTER_CMD_ON_CHANGE=yes/no and only exec command respectively if there is a remote or local change.

@deajan
Copy link
Owner

deajan commented Aug 17, 2021

Those commands are designed to run regardless of the file sync state, example to mount/dismount storage before and after execution.
What's your usecase ?

@totosh
Copy link
Author

totosh commented Aug 19, 2021

The usecase is to restart/reload a service only if a change happen (i.e. sync webserver config). Also exec a script in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants