diff options
Diffstat (limited to 'files/clever-set-drain.sh')
-rw-r--r-- | files/clever-set-drain.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/files/clever-set-drain.sh b/files/clever-set-drain.sh new file mode 100644 index 0000000..405cb28 --- /dev/null +++ b/files/clever-set-drain.sh | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/bash -e | ||
2 | |||
3 | function checkDrain { | ||
4 | clever drain | grep "${SYSLOG_UDP_SERVER}" | ||
5 | } | ||
6 | |||
7 | function setDrain { | ||
8 | clever drain create UDPSyslog "udp://${SYSLOG_UDP_SERVER}" | ||
9 | } | ||
10 | |||
11 | checkDrain || setDrain | ||