Skip to content

Feature Request: Postsync/Presync script execution (With propaply sync dependency) #6009

Closed

Description

@mathematechde

EDIT:
Scripts need to be run synchronously (syncthing does not continue until the script has ended execution).

EDIT 2:
Security variable "senders syncthing id"

Hello everyone.
How about implementing a folder option, to run scripts after a sync is complete and before a sync is done.

This would solve many problems like for example being able to sync the ignore configurations etc.
While this is really easy to implement for the developers (i think) there still has to be stuff done from the people who actually want to sync the configuration.

In a step by step list i think of it that way without sync dependency:
--- The first time you install syncthing would have to manually configure the scripts to be run once.

  1. add a folder where the files for the syncthing configurations are stored (you may need to rename them...)
  2. if that folder is synced 100% restart syncthing to load the new configuration
  3. tons of ways to implement "disable sync until main folder is synced" with scripts

Being able to configure a sync dependency would eleminate the need for third party developers to implement point 3.
So, yea dependency is not that big of a issue for me.

In addition there should be some more script execution variables. Like "current sync folder path" "global sync storage path".

And to get the perfection "run script if sender or receiver", but I do not know about the implementation of the protocol that much, to say weather this is complex to implement.

FOR SECURITY REASONS:
Yes this may be a concern, but I just need that feature since I only use synchting to sync my own stuff. Propapbly a command line switch to disable script execution would do it.

Ref:
#2491
#2353

And thank you for this awesome software.
Your program design and your love for perfectionism is awesome.
Cheers.

Activity

  1. ProactiveServices commented on Sep 12, 2019

    @ProactiveServices
    Contributor

    There are many existing issues for this, most of them can be found by searching the issues for "hook", with a particularly detailed issue here.

    I believe you can already implement your requirements by leveraging events via the API.

  2. mathematechde commented on Sep 12, 2019

    @mathematechde
    Author

    closed and will continue in #5601

  3. added
    frozen-due-to-age
    on Sep 12, 2020
  4. locked and limited conversation to collaborators on Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    frozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions