netxms-things/templates/applications/yggdrasil/yggdrasil_peers.sh

10 lines
154 B
Bash

#!/usr/bin/env bash
YGGDRASIL=$(which yggdrasilctl)
if [ "${YGGDRASIL}" == "" ]; then
exit 1
fi
echo $[ $(${YGGDRASIL} getpeers | wc -l) - 1 ]