diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2021-10-10 16:32:05 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2021-10-10 16:32:05 -0600 |
commit | 9a9b94e67791ac6bb93d1586cd26518765113367 (patch) | |
tree | 39716507bf7fb4eef87c54be2050ae787aa7bf12 /default.nix | |
parent | 624a38af2b96040384022413060861c3686447d6 (diff) |
fix runDir startup
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/default.nix b/default.nix index fac1871..6e06c43 100644 --- a/default.nix +++ b/default.nix @@ -78,7 +78,13 @@ entrypoint = pkgs.writeScript "mediocre-blog-entrypoint" '' #!/bin/sh - mkdir -p ${config.runDir} + + set -e + + if [ ! -d ${config.runDir} ]; then + mkdir -p ${config.runDir} + fi + mkdir -p ${config.dataDir} exec ${pkgs.circus}/bin/circusd ${circusCfg} ''; @@ -93,6 +99,8 @@ Restart=always RestartSec=1s User=mediocregopher + Group=mediocregopher + RuntimeDirectory=mediocre-blog ExecStart=${entrypoint} [Install] |