ma rst-issue: init
This commit is contained in:
parent
743a81b233
commit
0349ae613c
21
2configs/temp/rst-issue.nix
Normal file
21
2configs/temp/rst-issue.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{pkgs, ...}:
|
||||||
|
let
|
||||||
|
itf = "enp0s25";
|
||||||
|
in {
|
||||||
|
systemd.services.rst-issue = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
script = ''
|
||||||
|
d=/var/cache/rst-issue
|
||||||
|
mkdir -p $d
|
||||||
|
cd $d
|
||||||
|
ITF=${itf}
|
||||||
|
now=$(date --rfc-3339=s | sed 's/ /T/')
|
||||||
|
${pkgs.tcpdump}/bin/tcpdump -i $ITF -w run-$now.pcap &
|
||||||
|
echo "timestamp,$now" >> mtr.log
|
||||||
|
${pkgs.mtr}/bin/mtr -4 --tcp bsi.bund.de www.thalesgroup.com nokia.com -C --show-ips -z >> mtr.log
|
||||||
|
kill %1
|
||||||
|
'';
|
||||||
|
startAt = "*:0/15"; # every 15 minutes
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue