Bleala / Vdirsyncer-DOCKERIZED

Vdirsyncer - sync calendars and addressbooks between servers and the local filesystem. DOCKERIZED!
33 stars 7 forks source link

Ability to set a shell script to run after sync is complete #14

Closed c0d3m0nky closed 9 months ago

c0d3m0nky commented 1 year ago

I need to run some logic after the sync completes and with the servers I'm syncing I was getting wildly different run times.

Using my own CRON_FILE didn't work because the startup script writes the schedule to it at startup, so I ended up with a duplicate every time the container restarted

This change simply lets you specify a script file in POST_SYNC_SCRIPT_FILE env var, and if set, will include it as part of the cron job command

Bleala commented 1 year ago

Hey @c0d3m0nky thanks for your PR, I'll test the change and merge it, if there won't be any problems.

Hope this is okay for you. Greetings

chrisblech commented 10 months ago

Thank you for this PR, I would be interested in an integration, too.

Be aware that POST_SYNC_SCRIPT may not run when sync command fails (perfect for my use-case: ping healthchecks.io only after successful sync)