tahoe service: use ExecStart instead of script
Since only a single command is necessary to start Tahoe it is sufficient to use ExecStart and thereby skip starting up Bash (and leaving it running).
This commit is contained in:
parent
baea6a8d82
commit
8a424e3fbd
@ -233,6 +233,12 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
PIDFile = pidfile;
|
PIDFile = pidfile;
|
||||||
|
# Believe it or not, Tahoe is very brittle about the order of
|
||||||
|
# arguments to $(tahoe start). The node directory must come first,
|
||||||
|
# and arguments which alter Twisted's behavior come afterwards.
|
||||||
|
ExecStart = ''
|
||||||
|
${settings.package}/bin/tahoe start ${nodedir} -n -l- --pidfile=${pidfile}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
preStart = ''
|
preStart = ''
|
||||||
if [ \! -d ${nodedir} ]; then
|
if [ \! -d ${nodedir} ]; then
|
||||||
@ -248,12 +254,6 @@ in
|
|||||||
# ln -s /etc/tahoe-lafs/introducer-${node}.cfg ${nodedir}/tahoe.cfg
|
# ln -s /etc/tahoe-lafs/introducer-${node}.cfg ${nodedir}/tahoe.cfg
|
||||||
cp /etc/tahoe-lafs/introducer-${node}.cfg ${nodedir}/tahoe.cfg
|
cp /etc/tahoe-lafs/introducer-${node}.cfg ${nodedir}/tahoe.cfg
|
||||||
'';
|
'';
|
||||||
# Believe it or not, Tahoe is very brittle about the order of
|
|
||||||
# arguments to $(tahoe start). The node directory must come first,
|
|
||||||
# and arguments which alter Twisted's behavior come afterwards.
|
|
||||||
script = ''
|
|
||||||
tahoe start ${nodedir} -n -l- --pidfile=${pidfile}
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
users.extraUsers = flip mapAttrs' cfg.introducers (node: _:
|
users.extraUsers = flip mapAttrs' cfg.introducers (node: _:
|
||||||
nameValuePair "tahoe.introducer-${node}" {
|
nameValuePair "tahoe.introducer-${node}" {
|
||||||
@ -333,6 +333,12 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
PIDFile = pidfile;
|
PIDFile = pidfile;
|
||||||
|
# Believe it or not, Tahoe is very brittle about the order of
|
||||||
|
# arguments to $(tahoe start). The node directory must come first,
|
||||||
|
# and arguments which alter Twisted's behavior come afterwards.
|
||||||
|
ExecStart = ''
|
||||||
|
${settings.package}/bin/tahoe start ${nodedir} -n -l- --pidfile=${pidfile}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
preStart = ''
|
preStart = ''
|
||||||
if [ \! -d ${nodedir} ]; then
|
if [ \! -d ${nodedir} ]; then
|
||||||
@ -348,12 +354,6 @@ in
|
|||||||
# ln -s /etc/tahoe-lafs/${node}.cfg ${nodedir}/tahoe.cfg
|
# ln -s /etc/tahoe-lafs/${node}.cfg ${nodedir}/tahoe.cfg
|
||||||
cp /etc/tahoe-lafs/${node}.cfg ${nodedir}/tahoe.cfg
|
cp /etc/tahoe-lafs/${node}.cfg ${nodedir}/tahoe.cfg
|
||||||
'';
|
'';
|
||||||
# Believe it or not, Tahoe is very brittle about the order of
|
|
||||||
# arguments to $(tahoe start). The node directory must come first,
|
|
||||||
# and arguments which alter Twisted's behavior come afterwards.
|
|
||||||
script = ''
|
|
||||||
tahoe start ${nodedir} -n -l- --pidfile=${pidfile}
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
users.extraUsers = flip mapAttrs' cfg.nodes (node: _:
|
users.extraUsers = flip mapAttrs' cfg.nodes (node: _:
|
||||||
nameValuePair "tahoe.${node}" {
|
nameValuePair "tahoe.${node}" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user