aboutsummaryrefslogblamecommitdiffhomepage
path: root/files/clever-set-drain.sh
blob: f37498e22c844f3957cff7687b7cbbdf3baa449f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                   









                                                            
#!/usr/bin/env bash

set -e

function checkDrain {
  clever drain | grep "${SYSLOG_UDP_SERVER}"
}

function setDrain {
  clever drain create UDPSyslog "udp://${SYSLOG_UDP_SERVER}"
}

checkDrain || setDrain