DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-12-18 17:16:37

edward3h
Member
Registered: 2007-08-16
Posts: 14

Lighttpd cgi script in shell

Mainly because it amused me, I set up lighttpd on my box to run cgi scripts written as shell scripts. I have lighttpd as installed by Fonz Fun Plug.

In /ffp/etc/lighttpd.conf
Uncomment "mod_cgi" in server.modules.
Added line:

Code:

cgi.assign = ( ".cgi" => "/ffp/bin/sh")

Then I wrote my script in .../www/pages/test.cgi

Code:

echo '<html><head><title>Monitoring</title></head><body>'
echo '<pre>'
date
echo
df
echo
transmission-remote -l
echo '</pre>'
echo '</body></html>'

Which gives me a little status page. (Make sure test.cgi is executable).

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB