From: horse69 Date: Tue, 18 Sep 2012 00:16:27 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@722 01035d8c-6547-0410-b346-abe4f9... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=e23da793bebeed7b74f0f5b33ebbf1ba1e1a7b80;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@722 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/mini-asterisk-gui2/cgi-bin/setservice.cgi b/mini-asterisk-gui2/cgi-bin/setservice.cgi index 584d10a9..e97d63ba 100755 --- a/mini-asterisk-gui2/cgi-bin/setservice.cgi +++ b/mini-asterisk-gui2/cgi-bin/setservice.cgi @@ -19,13 +19,41 @@ Content-type: text/html EOF ARG=`echo "$QUERY_STRING" | sed -n "s/.*action=//p"` -echo "$ARG" +echo "arg is $ARG" if [ $ARG = "restartstatic" ]; then - echo "hi there" + echo "restart static" + /etc/init.d/network-static stop + /etc/init.d/network-static start +fi + +if [ $ARG = "restartbackup" ]; then + echo "restartbackup" + /etc/init.d/network-backup stop + /etc/init.d/network-backup start +fi + +if [ $ARG = "restartdhcp" ]; then + echo "restartdhcp" + /etc/init.d/network stop + /etc/init.d/network start +fi + +if [ $ARG = "enabledhcp" ]; then + echo "enabledhcp" + /etc/init.d/network-static disable + /etc/init.d/network-static stop + /etc/init.d/network enable + /etc/init.d/network start +fi + +if [ $ARG = "enablestatic" ]; then + echo "enable static" + /etc/init.d/network stop + /etc/init.d/network disable + /etc/init.d/network-static enable fi -# /etc/init.d/network "$ARG" cat <