Adding systeminfo

This commit is contained in:
stephb9959
2021-09-18 10:41:47 -07:00
committed by oblom0v
parent c025cd1416
commit 44951bedb2

View File

@@ -179,21 +179,13 @@ devicereport() {
jq < ${result_file}
}
fmsversion() {
curl ${FLAGS} -X GET "https://${OWFMS}/api/v1/system?command=version" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}" > ${result_file}
systeminfo() {
curl ${FLAGS} -X GET "https://${OWGW}/api/v1/system?command=info" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}" > ${result_file}
jq < ${result_file}
}
fmstimes() {
curl ${FLAGS} -X GET "https://${OWFMS}/api/v1/system?command=times" \
-H "accept: application/json" \
-H "Authorization: Bearer ${token}" > ${result_file}
jq < ${result_file}
}
help() {
echo
echo
@@ -211,8 +203,7 @@ case "$1" in
"connecteddevices") login; connecteddevices ; logout ;;
"connecteddevice") login; connecteddevice "$2" ; logout ;;
"devicereport") login; devicereport; logout ;;
"fmsversion") login; fmsversion; logout ;;
"fmstimes") login; fmstimes; logout ;;
"systeminfo") login; systeminfo; logout ;;
*) help ;;
esac