40scripts/get_fw.sh

22 lines
437 B
Bash
Raw Normal View History

2023-04-09 23:26:30 +00:00
#!/bin/sh
set -e
# FG_HOST=192.168.2.1 FG_PORT=11422 ./get_fw.sh
ssh_user="${FG_USER:-admin}"
ssh_host="${ssh_user}@${FG_HOST:-}"
ssh_port=${FG_PORT:-22}
ssh_opts="-q -p ${ssh_port}"
. util.sh # import ssh function after options are set
fg_updatekey_script="
get system status
"
ver=$(run_ssh_script "${fg_updatekey_script}" | \
grep "Version" | \
grep -o -P "(?<=Version: ).*(?=,build.*)" 2>/dev/null)
echo "Version is $ver"