diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-12-09 15:16:18 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-02-23 11:31:44 -0500 |
commit | 87da941348e1b345d1be348b091d3ae65ac66bb7 (patch) | |
tree | 443b357d8d5e7cc97853a84b3b3cc03f533df9a7 /.github/PULL_REQUEST_TEMPLATE | |
parent | 5dbbf233327bff1c89088ed0fc45882563240b1a (diff) |
Clean up daemon handling
Split `common.sh` into the vars and functions definitions vs starting
the daemon (and possibly other initialization logic). This way,
`init.sh` can just `source` the former. Trying to start the daemon
before `nix.conf` is written will fail because `nix daemon` requires
`--experimental-features 'nix-command'`.
`killDaemon` is idempotent, so it's safe to call when no daemon is
running.
`startDaemon` and `killDaemon` use the PID (which is now exported to
subshells) to decide whether there is work to be done, rather than
`NIX_REMOTE`, which might conceivably be set differently even if a
daemon is running.
`startDaemon` and `killDaemon` can save/restore the old `NIX_REMOTE` as
`NIX_REMOTE_OLD`.
`init.sh` kills daemon before deleting everything (including the daemon
socket).
Diffstat (limited to '.github/PULL_REQUEST_TEMPLATE')
0 files changed, 0 insertions, 0 deletions