-
Notifications
You must be signed in to change notification settings - Fork 229
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
A probably simple feature request: Simple support for post processing #1039
Comments
Just a quick comment about this:
#1 Unison is *great* for synchronizing files 1:1 to mirror
between systems.
But synchronizing config files, that need some post-update
processing is a rather different task, and is more of a
"1:N" task (one main host configuring many others).
I need both of these tasks, but for the propagating config
files? I use a utility called "synctool"
https://github.com/walterdejong/synctool
because once you head down the path of dealing with config
files, then you're in a maze of twisty little passages,
all different.
…On Fri, 24 May 2024 06:00:39 -0700 Tom-- ***@***.***> wrote:
Hello
thanks a lot for sharing your great and very useful work - for more
than a quarter century! 😃
I think I have a simple little improvement suggestion that could
serve many users / open up new user groups:
**Initial situation**
- I love unison to sync configuration files between redundant
computers because it is pretty simple to set up.
- But: Some services like the nginx community edition need to be
informed if the configuration files have been changed (here by unsion
synchronization).
**It would therefore be very useful:**
1. If the **unison exit code** would additionally return a new code
for: "All files were already up to date. (Unison has not changed any
file)". This would make it very easy for the Unison caller to perform
post-sync actions. 2. **Or:** It would be brilliant **if we could
configure something like: `PostProcessorOnFileChanged: <path to
command / script>`:** This command / script would be executed as soon
as the synchronization has changed at least one file.
Thanks a lot, kind regards,
Thomas
--
Drexel University |/ / · ν · Chuck Lane |D
======]--->---C-----π+--< Disque 911 |U
Particle Physics \ \ ~~ e+~~ 215-895-1545 |N
***@***.*** -μ+--+νν |E
|
Hello @celane, Thank you very much for your reference to syntool!
That's why unison is a much simpler and more elegant solution:
This workflow is really great, because a system engineer can work as usual. The only thing is that if a file had to be synchronized, Unison does not report this event via exit code and does not offer to execute a command for this event. I therefore very much hope that it will be very easy for Unison to return an additional exit code or read the config file and execute a command.
I've been in IT for 30 years in companies with 12 to 750 employees and have never once had the situation you describe. So I'm pretty sure that a lot of people can benefit from a Unison that somehow signals that files have been modified 😀. The background to this is that we could only ever do load balancing and failover with 2 servers at a time - that was always completely sufficient. Thanks a lot, kind regards, |
The issue tracker is only for fully-baked feature requests. Since we're already having an argument about how best to re-implement Ansible with unison, this isn't one of those :-) I am curious whether you did not see https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests or whether you did and thought this belonged here vs the list? I have moved this issue to https://github.com/bcpierce00/unison/wiki/Feature-Requests Please feel free to bring this up one one of the mailinglists. (Also, if you aren't proposing to develop the feature yourself, it's pretty unlikely anything would happen.) |
Hello
thanks a lot for sharing your great and very useful work - for more than 1/4 century! 😃
I think I have a simple little improvement suggestion that could serve many users / open up new user groups:
Initial situation
It would therefore be very useful:
Important: The exit code must say if the files on the local server, on the remote server or on both servers have been changed.
PostProcessorOnFileChanged: <path to command / script>
: This command / script would be executed as soon as the synchronization has changed at least one file. Important: Unison must pass a parameter which tells if files on the local server, on the remote server or on both servers have been changed.Thanks a lot, kind regards,
Thomas
The text was updated successfully, but these errors were encountered: