I have a bash script, which im using on a handful machines. On all machines, its the same script. Sometimes i need to adjust/update the script. With that, i need to copy the script to all this machines again.

Is there some way to update the script only on one central location and if this is done, the script checks itself, if there is a updated/changed variant on this central location and if so, copy the new version and restart itself after copy?

  • KianaTabion@lemmy.today
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Syncthing helps with syncing the bash script across all of your devices. However, as for restarting itself after the update/change, you might want to setup a daemon/service (or something) that restarts the bash script whenever Syncthing does its bidding.