git clone https://garage44.eu/jeroen/midas.git.. /units/midas-self-update.service
# Root, as `sudo midas hub setup` is: the published build installs itself, # updates the services and restarts the hub on it, as deploy.sh does by hand. # A build for the Macs' nodes, published beside it, goes to them too. # # Run by the midas that is installed, never by the one published: it is that # one which decides, from hub.conf's `self_update`, whether the published build # is run as root at all (`hub`), only with the owner's signature on it # (`signed`: /etc/midas/release.pub, src/release.rs), or never (`off`). [Unit] Description=midas: install the published build and restart the hub on it After=midas-publish.service [Service] Type=oneshot # The publish that wrote the stamp still tells the hub the deploy went out: # that must reach the hub before it restarts, or the landing never reads live. ExecStartPre=/bin/sleep 5 ExecStart=/usr/local/bin/midas hub self-update TimeoutStartSec=10min