websockify: Add unit descriptions
This commit is contained in:
parent
969fe07be6
commit
762ea5c578
|
@ -35,6 +35,7 @@ let cfg = config.services.networking.websockify; in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.services."websockify@" = {
|
systemd.services."websockify@" = {
|
||||||
|
description = "Service to forward websocket connections to TCP connections (from port:to port %I)";
|
||||||
script = ''
|
script = ''
|
||||||
IFS=':' read -a array <<< "$1"
|
IFS=':' read -a array <<< "$1"
|
||||||
${pkgs.pythonPackages.websockify}/bin/websockify --ssl-only \
|
${pkgs.pythonPackages.websockify}/bin/websockify --ssl-only \
|
||||||
|
@ -44,6 +45,7 @@ let cfg = config.services.networking.websockify; in {
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.targets."default-websockify" = {
|
systemd.targets."default-websockify" = {
|
||||||
|
description = "Target to start all default websockify@ services";
|
||||||
wants = mapAttrsToList (name: value: "websockify@${name}:${toString value}.service") cfg.portMap;
|
wants = mapAttrsToList (name: value: "websockify@${name}:${toString value}.service") cfg.portMap;
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue