diff options
Diffstat (limited to 'bareos/check-if-bareos-backup-is-running')
-rwxr-xr-x | bareos/check-if-bareos-backup-is-running | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bareos/check-if-bareos-backup-is-running b/bareos/check-if-bareos-backup-is-running index ea7cc3af..bb513e65 100755 --- a/bareos/check-if-bareos-backup-is-running +++ b/bareos/check-if-bareos-backup-is-running @@ -5,11 +5,12 @@ if [ $# -ne 0 ]; then exit 2 fi -if awk '{print $3}' /proc/net/tcp \ +if cat /proc/net/tcp* \ +| awk '{print $3}' \ | cut -d: -f2 \ | grep -qxiF '238F'; then - >&2 echo 'bareos-fd is not connected to bareos-sd' -else >&2 echo 'bareos-fd is connected to bareos-sd' exit 1 +else + >&2 echo 'bareos-fd is not connected to bareos-sd' fi |