mirror of https://github.com/rapenne-s/bento
bento: add a systemd service listening on port 51337 to trigger an update
This commit is contained in:
parent
d78f55f837
commit
116de7125f
|
@ -24,4 +24,20 @@ in {
|
|||
/bin/sh update.sh
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.sockets.listen-update = {
|
||||
enable = true;
|
||||
wantedBy = ["sockets.target"];
|
||||
requires = ["network.target"];
|
||||
listenStreams = ["51337"];
|
||||
socketConfig.Accept = "yes";
|
||||
};
|
||||
|
||||
systemd.services."listen-update@" = {
|
||||
path = with pkgs; [systemd];
|
||||
enable = true;
|
||||
serviceConfig.StandardInput = "socket";
|
||||
serviceConfig.ExecStart = "${pkgs.systemd.out}/bin/systemctl start bento-upgrade.service";
|
||||
serviceConfig.ExecStartPost = "${pkgs.systemd.out}/bin/journalctl -f --no-pager -u bento-upgrade.service";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue