collector: the pre script needs root

This commit is contained in:
Daniel Frank 2022-01-25 20:50:20 +01:00
parent 7f6312ad0c
commit c8467650a0
Signed by: tokudan
GPG key ID: 063CCCAD04182D32

View file

@ -31,7 +31,7 @@ in
PrivateTmp = true; PrivateTmp = true;
RuntimeDirectory = "collector"; RuntimeDirectory = "collector";
ExecStart = "${pkgs.ruby.withPackages (ps: with ps; [ json ])}/bin/ruby ${collector}/query-data.influx --config /run/collector/collector-config"; ExecStart = "${pkgs.ruby.withPackages (ps: with ps; [ json ])}/bin/ruby ${collector}/query-data.influx --config /run/collector/collector-config";
ExecStartPre = "${pkgs.writeShellScript "collector-init" '' ExecStartPre = "+${pkgs.writeShellScript "collector-init" ''
until [ -s /var/lib/influxdb/knotendaten.pw ]; do until [ -s /var/lib/influxdb/knotendaten.pw ]; do
sleep 1 sleep 1
done done