SatoshiPay: init replicaset at startup
Alan Pearce alan@alanpearce.eu
Tue, 15 Jan 2019 11:05:28 +0100
1 files changed, 11 insertions(+), 0 deletions(-)
jump to
M modules/satoshipay.nix → modules/satoshipay.nix
@@ -46,6 +46,17 @@ timerConfig = { OnActiveSec = "1 min"; }; }; + systemd.services.mongodb-init = { + description = "Init mongodb replicaset"; + requires = [ "mongodb.service" ]; + script = "${pkgs.mongodb}/bin/mongo --eval 'rs.initiate()'"; + }; + systemd.timers.mongodb-init = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnActiveSec = "2 min"; + }; + }; services.redis = { enable = true;