git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/unit: update preStart script
commite1e0059667ecd406d4c72b692871ae557fe42312 authorIzorkin <izorkin@elven.pw> dateTue 10 Dec 2019, 09:49 (7 years ago) parent7443d9d
1 file changed+1−1
nixos/modules/services/web-servers/unit/default.nix+1−1
nixos/modules/services/web-servers/unit/default.nix+1−1
@@ -93,7 +93,7 @@ in {
9393 wantedBy = [ "multi-user.target" ];
9494 path = with pkgs; [ curl ];
9595 preStart = ''
96− test -f '/run/unit/control.unit.sock' || rm -f '/run/unit/control.unit.sock'
96+ test -f '${cfg.stateDir}/conf.json' || rm -f '${cfg.stateDir}/conf.json'
9797 '';
9898 postStart = ''
9999 curl -X PUT --data-binary '@${configFile}' --unix-socket '/run/unit/control.unit.sock' 'http://localhost/config'