diff options
Diffstat (limited to 'core/modules/dnbd3-proxy-mode')
3 files changed, 17 insertions, 0 deletions
diff --git a/core/modules/dnbd3-proxy-mode/data/etc/systemd/system/dnbd3-logwatch.service b/core/modules/dnbd3-proxy-mode/data/etc/systemd/system/dnbd3-logwatch.service new file mode 100644 index 00000000..2d76781c --- /dev/null +++ b/core/modules/dnbd3-proxy-mode/data/etc/systemd/system/dnbd3-logwatch.service @@ -0,0 +1,8 @@ +[Unit] +Description=DNBD3 monitor reporting to Satellite Server + +[Service] +ExecStart=/opt/openslx/scripts/systemd-dnbd3_logwatch +Restart=always +RestartSec=5 +TimeoutStopSec=2 diff --git a/core/modules/dnbd3-proxy-mode/data/etc/systemd/system/dnbd3-proxy.target.requires/dnbd3-logwatch.service b/core/modules/dnbd3-proxy-mode/data/etc/systemd/system/dnbd3-proxy.target.requires/dnbd3-logwatch.service new file mode 120000 index 00000000..56096070 --- /dev/null +++ b/core/modules/dnbd3-proxy-mode/data/etc/systemd/system/dnbd3-proxy.target.requires/dnbd3-logwatch.service @@ -0,0 +1 @@ +../dnbd3-logwatch.service
\ No newline at end of file diff --git a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_logwatch b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_logwatch new file mode 100755 index 00000000..f390495d --- /dev/null +++ b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_logwatch @@ -0,0 +1,8 @@ +#!/bin/ash + +journalctl -f -n 0 -u dnbd3-proxy \ + | grep --line-buffered -F -i -e 'crc ' -e 'crc32' -e 'hash check' \ + | while read -r line; do slxlog "dnbd3-hashfail" "$line"; done + +exit 0 + |