Quantcast
Channel: VOIP-info.org Wiki Changes
Viewing all articles
Browse latest Browse all 5767

Bash script to remote reboot some Grandstream phones

$
0
0

Works with GXP1160 / GXP1165 / GXP2120
Might work with other Grandstream phones....

Usage:
#gsreboot {admin_password} {phone_IP}

#cat /usr/local/bin/gsreboot

#!/bin/bash
sid=$(curl -s -c /tmp/cookies.txt -d"password=${1}" http://${2}/cgi-bin/dologin | sed -r 's|.*"sid" : "([0-9a-z]+)".*|\1|' )
curl -b /tmp/cookies.txt -d"request=REBOOT&sid=${sid}" http://${2}/cgi-bin/api-sys_operation


See also


Viewing all articles
Browse latest Browse all 5767

Trending Articles