Projet

Général

Profil

Révision 3790d201

ID3790d2017911439a8ff67c75b59b4143046a69c5
Parent 144f333c
Enfant b43ec018

Ajouté par Younes Ichiche il y a presque 4 ans

remove double catch function

Voir les différences:

plugins/router/mikrotik_system
88 88
    fi
89 89
  done <<< "$data"
90 90
}
91
catch()
92
{
93
eval "$({
94
__2="$(
95
  { __1="$("${@:3}")"; } 2>&1;
96
  ret=$?;
97
  printf '%q=%q\n' "$1" "$__1" >&2;
98
  exit $ret
99
  )";
100
ret="$?";
101
printf '%s=%q\n' "$2" "$__2" >&2;
102
printf '( exit %q )' "$ret" >&2;
103
} 2>&1 )";
104
}
105 91
function get_data {
106 92
  # hole daten per ssh
107 93
  catch data stderr sshpass -p  "$ssh_password" ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$ssh_user"@"$ssh_host" ':delay 6s; /system health print; /system resource print; /system resource cpu print; /system identity print'

Formats disponibles : Unified diff