From cd1b3da65075efc5608bff0532dd81295301697b Mon Sep 17 00:00:00 2001 From: bashmak Date: Sat, 22 Apr 2017 15:36:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=AD=D1=82=D0=B8=20=D1=8E=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8B=20=D0=B1=D1=83=D0=B4=D1=83=D1=82=20=D0=BE=D1=82=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BB=D1=8F=D1=82=D1=8C=20=D0=BD=D0=B0=D0=BA?= =?UTF-8?q?=D0=BE=D0=BF=D0=B8=D0=B2=D1=88=D1=83=D1=8E=D1=81=D1=8F=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=84=D1=83=20=D1=81=20netflow=20=D0=BD=D0=B0=20=D1=81?= =?UTF-8?q?=D0=B5=D1=80=D0=B2=D0=B5=D1=80=20=D0=B1=D0=B0=D0=B7=20=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- systemd_units/djing_rotate.service | 12 ++++++++++++ systemd_units/djing_rotate.timer | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 systemd_units/djing_rotate.service create mode 100644 systemd_units/djing_rotate.timer diff --git a/systemd_units/djing_rotate.service b/systemd_units/djing_rotate.service new file mode 100644 index 0000000..4e1678b --- /dev/null +++ b/systemd_units/djing_rotate.service @@ -0,0 +1,12 @@ +[Unit] +Description=A job for rotate djing netflow data + +[Service] +Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" +Type=oneshot +ExecStart=/bin/bash -c "kill -HUP `cat /run/flow.pid.6343`" +User=root +Group=root + +[Install] +WantedBy=multi-user.target diff --git a/systemd_units/djing_rotate.timer b/systemd_units/djing_rotate.timer new file mode 100644 index 0000000..c0be202 --- /dev/null +++ b/systemd_units/djing_rotate.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Run every one minute rotate flows for djing + +[Timer] +OnCalendar=*-*-* *:*:59 +Persistent=true +RandomizedDelaySec=5 +Unit=djing_rotate.service + +[Install] +WantedBy=timers.target