We do it now sequentially rather than relying on the previous job taking
less than one minute to finish (which is unlikely as the size of the
logs grow)
Goaccess doesn’t like to be started twice concurrently, so sequential is
needed
Fixes https://git.immae.eu/mantisbt/view.php?id=110
goaccess $TMPFILE --no-progress -o /var/lib/goaccess/${domain}/index.html -p ${conf}
'';
in "${d}/bin/stats-${domain}";
+ allStats = sites: pkgs.writeScript "stats" ''
+ #!${pkgs.stdenv.shell}
+
+ ${builtins.concatStringsSep "\n" (map (v: stats v.name v.conf) sites)}
+ '';
in
- pkgs.lib.lists.imap0 (i: v: "${toString (i+5)} 0 * * * root ${stats v.name v.conf}") cfg.sites;
+ [
+ "5 0 * * * root ${allStats cfg.sites}"
+ ];
};
system.activationScripts.goaccess = ''