nixos/unit: update preStart script
This commit is contained in:
parent
7443d9dfd4
commit
e1e0059667
@ -93,7 +93,7 @@ in {
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = with pkgs; [ curl ];
|
path = with pkgs; [ curl ];
|
||||||
preStart = ''
|
preStart = ''
|
||||||
test -f '/run/unit/control.unit.sock' || rm -f '/run/unit/control.unit.sock'
|
test -f '${cfg.stateDir}/conf.json' || rm -f '${cfg.stateDir}/conf.json'
|
||||||
'';
|
'';
|
||||||
postStart = ''
|
postStart = ''
|
||||||
curl -X PUT --data-binary '@${configFile}' --unix-socket '/run/unit/control.unit.sock' 'http://localhost/config'
|
curl -X PUT --data-binary '@${configFile}' --unix-socket '/run/unit/control.unit.sock' 'http://localhost/config'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user