Merge pull request #14597 from valeriangalliat/hotfix/shout
Shout: fix infinite loop in service configuration
This commit is contained in:
commit
75d385f9fc
@ -11,7 +11,7 @@ let
|
|||||||
mv config.js $out
|
mv config.js $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configFile = if (cfg.configFile != null) then cfg.configFile else ''
|
finalConfigFile = if (cfg.configFile != null) then cfg.configFile else ''
|
||||||
var _ = require('${pkgs.shout}/lib/node_modules/shout/node_modules/lodash')
|
var _ = require('${pkgs.shout}/lib/node_modules/shout/node_modules/lodash')
|
||||||
|
|
||||||
module.exports = _.merge(
|
module.exports = _.merge(
|
||||||
@ -48,7 +48,7 @@ in {
|
|||||||
|
|
||||||
configFile = mkOption {
|
configFile = mkOption {
|
||||||
type = types.nullOr types.lines;
|
type = types.nullOr types.lines;
|
||||||
default = configFile;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Contents of Shout's <filename>config.js</filename> file.
|
Contents of Shout's <filename>config.js</filename> file.
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ in {
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
preStart = "ln -sf ${pkgs.writeText "config.js" configFile} ${shoutHome}/config.js";
|
preStart = "ln -sf ${pkgs.writeText "config.js" finalConfigFile} ${shoutHome}/config.js";
|
||||||
script = concatStringsSep " " [
|
script = concatStringsSep " " [
|
||||||
"${pkgs.shout}/bin/shout"
|
"${pkgs.shout}/bin/shout"
|
||||||
(if cfg.private then "--private" else "--public")
|
(if cfg.private then "--private" else "--public")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user