wok diff ppp/stuff/ppp.cgi @ rev 19370

ppp: remove pppnc (done by pppssh)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 09 11:14:54 2016 +0200 (2016-08-09)
parents 1ae2567134a8
children 8c71bd3c7080
line diff
     1.1 --- a/ppp/stuff/ppp.cgi	Tue Jul 26 13:47:19 2016 +0200
     1.2 +++ b/ppp/stuff/ppp.cgi	Tue Aug 09 11:14:54 2016 +0200
     1.3 @@ -23,9 +23,6 @@
     1.4  		[ "$(which pppssh 2>/dev/null)" ] && cat <<EOT
     1.5  <li><a data-icon="vpn" href="ppp.cgi#pppssh" data-root>$(_ 'PPP/SSH')</a></li>
     1.6  EOT
     1.7 -		cat <<EOT
     1.8 -<li><a data-icon="upgrade" href="ppp.cgi#pppnc" data-root>$(_ 'Route shortcut')</a></li>
     1.9 -EOT
    1.10  		;;
    1.11  		*)
    1.12  		cat <<EOT
    1.13 @@ -79,14 +76,6 @@
    1.14  		killall pppd
    1.15  	fi
    1.16  	;;
    1.17 -*\ setpppnc\ *)
    1.18 -	[ "$(GET stop_pppncs)" ] && killall pppnc-server
    1.19 -	[ "$(GET start_pppncs)" ] &&
    1.20 -		pppnc-server "$(GET port)" "$(GET localip):$(GET remoteip)" &
    1.21 -	[ "$(GET stop_pppncc)" ] && killall pppnc-client
    1.22 -	[ "$(GET start_pppncc)" ] &&
    1.23 -		pppnc-client "$(GET serverip)" "$(GET port)" "$(GET routes)" &
    1.24 -	;;
    1.25  *\ setpppssh\ *)
    1.26  	cat > /etc/ppp/pppssh <<EOT
    1.27  PEER="$(GET peer)"
    1.28 @@ -128,8 +117,6 @@
    1.29  ACCOUNT="$(sed '/^ACCOUNT=/!d;s/^.*=\([^ \t]*\).*/\1/' /etc/ppp/scripts/ppp-on)"
    1.30  PASSPSTN="$(sed '/^PASSWORD=/!d;s/^.*=\([^ \t]*\).*/\1/' /etc/ppp/scripts/ppp-on)"
    1.31  PHONE="$(sed '/^TELEPHONE=/!d;s/^.*=\([^ \t]*\).*/\1/' /etc/ppp/scripts/ppp-on)"
    1.32 -busybox ps x | grep -v grep | grep -q pppnc_server || stops_disabled='disabled'
    1.33 -busybox ps x | grep -v grep | grep -q pppnc_client || stopc_disabled='disabled'
    1.34  TITLE="$(_ 'TazPanel - Network') - $(_ 'PPP Connections')"
    1.35  header
    1.36  xhtml_header | sed 's/id="content"/id="content-sidebar"/'
    1.37 @@ -247,46 +234,6 @@
    1.38  	--></footer>
    1.39  </form>
    1.40  </section>
    1.41 -
    1.42 -<a name="pppnc"></a>
    1.43 -<section>
    1.44 -	<header>
    1.45 -		<span data-icon="upgrade">$(_ 'Route shortcut') -
    1.46 -		$(_ 'Reach unreachable networks')</span>
    1.47 -	</header>
    1.48 -<form method="get">
    1.49 -	<input type="hidden" name="setppprc" />
    1.50 -	<table>
    1.51 -	<tr>
    1.52 -		<td>$(_ 'UDP port')</td>
    1.53 -		<td><input type="text" name="port" size="50" value="1111" /></td>
    1.54 -	</tr>
    1.55 -	<tr> <td colspan=2 align=center>--- $(_ 'Server only') ---</td> </tr>
    1.56 -	<tr>
    1.57 -		<td>$(_ 'Local IP address')</td>
    1.58 -		<td><input type="text" name="localip" size="50" value="${LOCALIP:-192.168.254.1}" /></td>
    1.59 -	</tr>
    1.60 -	<tr>
    1.61 -		<td>$(_ 'Remote IP address')</td>
    1.62 -		<td><input type="text" name="remoteip" size="50" value="${REMOTEIP:-192.168.254.2}" /></td>
    1.63 -	<tr> <td colspan=2 align=center>--- $(_ 'Client only') ---</td> </tr>
    1.64 -	<tr>
    1.65 -		<td>$(_ 'Server IP address')</td>
    1.66 -		<td><input type="text" name="serverip" size="50" value="1.2.3.4" /></td>
    1.67 -	</tr>
    1.68 -	<tr>
    1.69 -		<td>$(_ 'Server routes')</td>
    1.70 -		<td><input type="text" name="routes" size="50" value="${ROUTES:-192.168.10.0/24 192.168.20.0/28}" title="$(_ "Routes on peer network to import or 'default' to redirect the default route")"/></td>
    1.71 -	</tr>
    1.72 -	</table>
    1.73 -	<footer><!--
    1.74 -		--><button type="submit" name="start_pppncs" data-icon="start" >$(_ 'Start server'  )</button><!--
    1.75 -		--><button type="submit" name="stop_pppncs"  data-icon="stop" $stops_disabled>$(_ 'Stop server'   )</button><!--
    1.76 -		--><button type="submit" name="start_pppncc" data-icon="start" >$(_ 'Start client'  )</button><!--
    1.77 -		--><button type="submit" name="stop_pppncc"  data-icon="stop" $stopc_disabled>$(_ 'Stop client'   )</button><!--
    1.78 -	--></footer>
    1.79 -</form>
    1.80 -</section>
    1.81  EOT
    1.82  if [ "$(which pppssh 2>/dev/null)" ]; then
    1.83  	[ -s /etc/ppp/pppssh ] && . /etc/ppp/pppssh