22 lines
437 B
Bash
22 lines
437 B
Bash
|
#!/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"
|