Home Page › Forums › Network Management › Request a new feature › User-defined page in Zeroshell’s GUI to run specific tools › Re: A very little change in ZS could do it
Hello.
Back on this topic.
The next challenge is to create a small Web interface in the LAN to display the state of stations and send them directives like Wake-on-LAN, shutdown etc.
Naturally it must be provided by the LAN Master, that is: the ZS box (Alix in my case).
Looking at the insides, we have:
root@janus1> ll /cdrom/usr/local/apache2/htdocs
total 3.5K
lr-xr-xr-x 1 root root 43 Mar 3 06:19 bwd -> /var/register/system/bandwidthd/work/htdocs
lr-xr-xr-x 1 root root 46 Mar 3 06:19 cp_image -> /var/register/system/cp/Auth/Custom/Image/File
-r--r--r-- 1 root root 1.1K Mar 3 06:15 default.css
lr-xr-xr-x 1 root root 12 Mar 3 06:19 img.tpl -> /tmp/img.tpl
-r-xr-xr-x 1 root root 867 Mar 3 06:15 index.html
dr-xr-xr-x 2 root root 2.0K Mar 3 06:15 kerbynet
-r--r--r-- 1 root root 26 Mar 3 06:15 robots.txt
root@janus1> ll /cdrom/usr/local/apache2/cgi-bin
total 731K
-r--r--r-- 1 root root 1.0K Mar 3 06:15 .rnd
-r-xr-xr-x 1 root root 1.9M Mar 3 06:15 kerbynet
All that in read-only.
It is possible to create a file /tmp/img.tpl/index.html and it will show at URL https:///img.tpl/…
Then what command can it trigger ?
None of course ! 😆
By looking at the URLs from various pages of the ZS GUI, I tried variants of such a thing:
https:///cgi-bin/kerbynet?Section=NoAuthREQ&Action=Render&Object=TestingScript&ScriptName=test
…but Mr kerbynet refuses to cooperate 😛 and I understand that…
What to do then ?
The custom (set of) pages must be located in a subfolder of htdocs/ and they must invoke a different CGI script written under full responsibility of the people doing that, of course.
Actually they must be located somewhere else, typically under /opt, and linked to htdocs/ and cgi-bin/ with “optional in case of” links like the existing img.tpl/.
The challenge now is to modify the iso9660 then reinsert it into the CF card to make these 2 links appear there 😡
The request
Logically the request is for such a new feature: 2 “in case of” soft links that could be set this way (the word ‘tools’ looks generic enough to fit any need):
/cdrom/usr/local/apache2/htdocs/tools -> /opt/webtools/htdocs
/cdrom/usr/local/apache2/cgi-bin/tools -> /opt/webtools/cgi-bin
Nothing more, the User will be responsible for creating or not the 2 pointed directories and, if it does it, to secure what he will put inside.
Your positions ? An idea to do it another way ?
Thanks, Best regards.