From e23da793bebeed7b74f0f5b33ebbf1ba1e1a7b80 Mon Sep 17 00:00:00 2001 From: horse69 Date: Tue, 18 Sep 2012 00:16:27 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/freetel/code@722 01035d8c-6547-0410-b346-abe4f91aad63 --- mini-asterisk-gui2/cgi-bin/setservice.cgi | 34 +++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) 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 < -- 2.25.1