Use types.lines for script/preStart/postStart/postStop
This commit is contained in:
parent
5620e69b5d
commit
33cb0bbb4b
@ -47,7 +47,7 @@ in rec {
|
|||||||
|
|
||||||
requires = mkOption {
|
requires = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Start the specified units when this unit is started, and stop
|
Start the specified units when this unit is started, and stop
|
||||||
this unit when the specified units are stopped or fail.
|
this unit when the specified units are stopped or fail.
|
||||||
@ -56,7 +56,7 @@ in rec {
|
|||||||
|
|
||||||
wants = mkOption {
|
wants = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Start the specified units when this unit is started.
|
Start the specified units when this unit is started.
|
||||||
'';
|
'';
|
||||||
@ -64,7 +64,7 @@ in rec {
|
|||||||
|
|
||||||
after = mkOption {
|
after = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
If the specified units are started at the same time as
|
If the specified units are started at the same time as
|
||||||
this unit, delay this unit until they have started.
|
this unit, delay this unit until they have started.
|
||||||
@ -73,7 +73,7 @@ in rec {
|
|||||||
|
|
||||||
before = mkOption {
|
before = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
If the specified units are started at the same time as
|
If the specified units are started at the same time as
|
||||||
this unit, delay them until this unit has started.
|
this unit, delay them until this unit has started.
|
||||||
@ -82,7 +82,7 @@ in rec {
|
|||||||
|
|
||||||
bindsTo = mkOption {
|
bindsTo = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Like ‘requires’, but in addition, if the specified units
|
Like ‘requires’, but in addition, if the specified units
|
||||||
unexpectedly disappear, this unit will be stopped as well.
|
unexpectedly disappear, this unit will be stopped as well.
|
||||||
@ -91,7 +91,7 @@ in rec {
|
|||||||
|
|
||||||
partOf = mkOption {
|
partOf = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
If the specified units are stopped or restarted, then this
|
If the specified units are stopped or restarted, then this
|
||||||
unit is stopped or restarted as well.
|
unit is stopped or restarted as well.
|
||||||
@ -100,7 +100,7 @@ in rec {
|
|||||||
|
|
||||||
conflicts = mkOption {
|
conflicts = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
If the specified units are started, then this unit is stopped
|
If the specified units are started, then this unit is stopped
|
||||||
and vice versa.
|
and vice versa.
|
||||||
@ -109,13 +109,13 @@ in rec {
|
|||||||
|
|
||||||
requiredBy = mkOption {
|
requiredBy = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = "Units that require (i.e. depend on and need to go down with) this unit.";
|
description = "Units that require (i.e. depend on and need to go down with) this unit.";
|
||||||
};
|
};
|
||||||
|
|
||||||
wantedBy = mkOption {
|
wantedBy = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = "Units that want (i.e. depend on) this unit.";
|
description = "Units that want (i.e. depend on) this unit.";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
script = mkOption {
|
script = mkOption {
|
||||||
type = types.str;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Shell commands executed as the service's main process.";
|
description = "Shell commands executed as the service's main process.";
|
||||||
};
|
};
|
||||||
@ -191,7 +191,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
preStart = mkOption {
|
preStart = mkOption {
|
||||||
type = types.string;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands executed before the service's main process
|
Shell commands executed before the service's main process
|
||||||
@ -200,7 +200,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
postStart = mkOption {
|
postStart = mkOption {
|
||||||
type = types.string;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands executed after the service's main process
|
Shell commands executed after the service's main process
|
||||||
@ -209,7 +209,7 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
postStop = mkOption {
|
postStop = mkOption {
|
||||||
type = types.string;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands executed after the service's main process
|
Shell commands executed after the service's main process
|
||||||
@ -262,7 +262,7 @@ in rec {
|
|||||||
|
|
||||||
listenStreams = mkOption {
|
listenStreams = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
example = [ "0.0.0.0:993" "/run/my-socket" ];
|
example = [ "0.0.0.0:993" "/run/my-socket" ];
|
||||||
description = ''
|
description = ''
|
||||||
For each item in this list, a <literal>ListenStream</literal>
|
For each item in this list, a <literal>ListenStream</literal>
|
||||||
|
Loading…
Reference in New Issue
Block a user