Broadband-Hamnet™ Forum :: General
Welcome Guest   [Register]  [Login]
 Subject :Adding an HTML page directly on the node.. 2016-02-22- 11:07:11 
KA1PXZ
Member
Joined: 2014-07-07- 20:09:47
Posts: 11
Location

Since the nodes act as a webserver for the GUI, is there anyway to place an HTML file directly on the node that would be accessible as a service?  Similar to the way HAMCHAT is?  Looking to put a brief HTML page directly on the node that would open up and would have several links to other resources that may be available outside the mesh, like EOC websites, etc..  Looking for something simple and doesn't need to look pretty.  Could even do something that has an automatic script re-direct.  I am familiar with how to SSH into a node but wouldn't know where to put the HTML file or how it would get opened.  Thanks.

 

IP Logged
 Subject :Re:Adding an HTML page directly on the node.. 2016-03-02- 22:04:22 
SM7I
Member
Joined: 2012-04-30- 14:56:55
Posts: 79
Location: JO65mo
 

Yes, it is possible. I´ve stup a new page just for AMPRnet status on some of our nodes. You´ll need to be familiar with Perl to do this.

The files are located in /www/cgi-bin

First edit the perlfunc.pm to add a reference to your new page, like this (ampr is what I added):

my @pages = qw(status setup ports ampr admin);

my %titles = (status => "Node Status",
setup => "Basic Setup",
ports => "Port Forwarding, 
DHCP, and Services",
ampr => "AMPRnet",
admin => "Administration");

Then you must add a new file in the same folder named (in my case ampr) corresponding to what you added in perlfunc.pm

Look at the securityflags of the other perlfiles and chmod your own the same way.

Then you´ll have to edit your new file and start with the following section:

#!/usr/bin/perl
$debug = 0;
use perlfunc;

Happy editing !!!

IP Logged
Last Edited On: 2016-03-02- 22:07:59 By SM7I for the Reason
IT infrastructure and security professional
Page # 


Powered by ccBoard


SPONSORED AD: