From: <abe...@us...> - 2017-02-02 17:40:10
|
Revision: 8145 http://sourceforge.net/p/astlinux/code/8145 Author: abelbeck Date: 2017-02-02 17:40:08 +0000 (Thu, 02 Feb 2017) Log Message: ----------- web interface, Network tab, Dynamic DNS Update, add button to edit '/mnt/kd/ddclient.conf' if it exists. Also if '/mnt/kd/ddclient.conf' exists, any of DDUSER, DDPASS, DDHOST may be undefined and ddclient will start with DDCLIENT=ddclient Modified Paths: -------------- branches/1.0/package/ddclient/dynamicdns.init branches/1.0/package/webinterface/altweb/admin/network.php Modified: branches/1.0/package/ddclient/dynamicdns.init =================================================================== --- branches/1.0/package/ddclient/dynamicdns.init 2017-02-02 14:53:44 UTC (rev 8144) +++ branches/1.0/package/ddclient/dynamicdns.init 2017-02-02 17:40:08 UTC (rev 8145) @@ -64,7 +64,7 @@ *) service="$(echo "$DDSERVICE" | tr -d '^$*[]|"')" ;; # sanitize for sed regex esac - if [ -n "$DDUSER" -a -n "$DDPASS" -a -n "$DDHOST" ]; then + if [ -n "$DDUSER" -a -n "$DDPASS" -a -n "$DDHOST" ] || [ -f /mnt/kd/ddclient.conf ]; then # Genearate /etc/ddclient.conf configuration file if [ -f /mnt/kd/ddclient.conf ]; then Modified: branches/1.0/package/webinterface/altweb/admin/network.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/network.php 2017-02-02 14:53:44 UTC (rev 8144) +++ branches/1.0/package/webinterface/altweb/admin/network.php 2017-02-02 17:40:08 UTC (rev 8145) @@ -1041,6 +1041,12 @@ $result = saveNETWORKsettings($NETCONFDIR, $NETCONFFILE); header('Location: /admin/pptp.php'); exit; + } elseif (isset($_POST['submit_edit_ddclient'])) { + $result = saveNETWORKsettings($NETCONFDIR, $NETCONFFILE); + if (is_writable($file = '/mnt/kd/ddclient.conf')) { + header('Location: /admin/edit.php?file='.$file); + exit; + } } elseif (isset($_POST['submit_edit_ldap'])) { $result = saveNETWORKsettings($NETCONFDIR, $NETCONFFILE); if (is_writable($file = '/mnt/kd/ldap.conf')) { @@ -2109,6 +2115,10 @@ $sel = ($dd_client === 'ddclient' || $dd_client === 'inadyn') ? ' selected="selected"' : ''; putHtml('<option value="ddclient"'.$sel.'>enabled</option>'); putHtml('</select>'); + if (is_writable('/mnt/kd/ddclient.conf')) { + putHtml('–'); + putHtml('<input type="submit" value="Dynamic DNS Configuration" name="submit_edit_ddclient" class="button" />'); + } putHtml('</td></tr>'); putHtml('<tr class="dtrow1"><td style="text-align: left;" colspan="6">'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |