demo / network-computer
Public
Copy of github.com/askrobots/network-computer (MIT): a desk you reach from anything. The original lives on GitHub.
GitStable demo
README: say this is a copy and where the original is
cde82c2
14 hours, 3 minutes ago
History
nc-object-files.service · 806 bytes · 19 lines
| 1 | [Unit] |
| 2 | Description=network-computer: the object server's files as ~/Objects |
| 3 | After=nc-object-server.service |
| 4 | # Wants, not Requires: restarting the object server must not unmount a folder |
| 5 | # apps have files open in; davfs2 waits out a short outage by itself |
| 6 | Wants=nc-object-server.service |
| 7 | [Service] |
| 8 | Type=oneshot |
| 9 | RemainAfterExit=yes |
| 10 | ExecStartPre=/bin/sh -c 'for i in $(seq 60); do curl -sf http://127.0.0.1:8001/health >/dev/null && exit 0; sleep 1; done; exit 1' |
| 11 | ExecStart=/usr/local/bin/nc-object-files mount |
| 12 | ExecStop=/usr/local/bin/nc-object-files umount |
| 13 | # davfs2 runs on after mounting; on stop, umount lets it upload what is left |
| 14 | # and exit. systemd must not kill it first: that loses those uploads and |
| 15 | # leaves a dead mount behind. |
| 16 | KillMode=process |
| 17 | TimeoutStopSec=120 |
| 18 | [Install] |
| 19 | WantedBy=multi-user.target |