Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: make/fl-cgi/fl-cgi.mk
- ===================================================================
- --- make/fl-cgi/fl-cgi.mk (Revision 0)
- +++ make/fl-cgi/fl-cgi.mk (Revision 0)
- @@ -0,0 +1,12 @@
- +$(call PKG_INIT_BIN,0.1)
- +$(PKG)_CATEGORY:=Web interfaces
- +
- +$(PKG_UNPACKED)
- +
- +$(pkg):
- +
- +$(pkg)-precompiled:
- +
- +$(pkg)-clean:
- +
- +$(PKG_FINISH)
- Index: make/fl-cgi/Config.in
- ===================================================================
- --- make/fl-cgi/Config.in (Revision 0)
- +++ make/fl-cgi/Config.in (Revision 0)
- @@ -0,0 +1,6 @@
- +config FREETZ_PACKAGE_FL_CGI
- + bool "Fritz!Load CGI 0.1"
- + default n
- + help
- + Provides a hook outside AVMs web structure to Fritz!Load.
- + When Fritz!Load uses this hook, it becomes available on port 90
- Index: make/fl-cgi/files/.language
- ===================================================================
- --- make/fl-cgi/files/.language (Revision 0)
- +++ make/fl-cgi/files/.language (Revision 0)
- @@ -0,0 +1,8 @@
- +languages
- +{ de en }
- +default
- +{ en }
- +files
- +{
- + usr/lib/cgi-bin/fl.cgi
- +}
- Index: make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi
- ===================================================================
- --- make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi (Revision 0)
- +++ make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi (Revision 0)
- @@ -0,0 +1,42 @@
- +#!/bin/sh
- +
- +
- +. /usr/lib/libmodcgi.sh
- +
- +check "$FL_ENABLED" yes:auto inetd "*":man
- +
- +sec_begin '$(lang de:"Starttyp" en:"Start type")'
- +
- +cat << EOF
- +<p>
- +<input id="e1" type="radio" name="enabled" value="yes"$auto_chk><label for="e1"> $(lang de:"Automatisch" en:"Automatic")</label>
- +<input id="e2" type="radio" name="enabled" value="no"$man_chk><label for="e2"> $(lang de:"Manuell" en:"Manual")</label>
- +EOF
- +[ -e /mod/etc/default.inetd/inetd.cfg ] &&
- +cat << EOF
- +<input id="e3" type="radio" name="enabled" value="inetd"$inetd_chk><label for="e3"> $(lang de:"Inetd" en:"Inetd")</label>
- +EOF
- +cat << EOF
- +</p>
- +EOF
- +
- +sec_end
- +
- +sec_begin '$(lang de:"Anzeigen" en:"Show")'
- +
- +cat << EOF
- +<ul>
- +<li><a href="/cgi-bin/fl" target="_blank">$(lang de:"Fritz!Load-Webinterface" en:"Fritz!Load web interface")</a></li>
- +</ul>
- +EOF
- +
- +sec_end
- +
- +sec_begin '$(lang de:"Fritz!Load Interface" en:"Fritz!Load interface")'
- +
- +cat << EOF
- +<h2>$(lang de:"Port des Fritz!Load-Webservers" en:"Port of Fritz!Load webserver"):</h2>
- +<p>Port: <input type="text" name="port" size="5" maxlength="5" value="$(html "$FL_PORT")"></p>
- +EOF
- +
- +sec_end
- Eigenschaftsänderungen: make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi
- ___________________________________________________________________
- Hinzugefügt: svn:executable
- + *
- Index: make/fl-cgi/files/root/usr/bin/webcfg-fl
- ===================================================================
- --- make/fl-cgi/files/root/usr/bin/webcfg-fl (Revision 0)
- +++ make/fl-cgi/files/root/usr/bin/webcfg-fl (Revision 0)
- @@ -0,0 +1,19 @@
- +#!/bin/sh
- +
- +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/mod/sbin:/mod/bin:/mod/usr/sbin:/mod/usr/bin
- +export LD_LIBRARY_PATH=/mod/lib
- +
- +DAEMON=fl
- +DAEMON_BIN=httpd-$DAEMON
- +DAEMON_ENV="PATH=$PATH"
- +
- +
- +if [ ! -r "/mod/etc/conf/${DAEMON}.cfg" ]; then
- + echo "Error[$DAEMON]: not configured" 1>&2
- + exit 1
- +fi
- +. /mod/etc/conf/${DAEMON}.cfg
- +
- +homedir=/usr/mww-${DAEMON}/
- +
- +exec env - $DAEMON_ENV $DAEMON_BIN "$@" -p "$FL_PORT" -c /mod/etc/webcfg.conf -h "$homedir" -r "FritzLoad" 2>/dev/null
- Eigenschaftsänderungen: make/fl-cgi/files/root/usr/bin/webcfg-fl
- ___________________________________________________________________
- Hinzugefügt: svn:executable
- + *
- Index: make/fl-cgi/files/root/usr/mww-fl/index.html
- ===================================================================
- --- make/fl-cgi/files/root/usr/mww-fl/index.html (Revision 0)
- +++ make/fl-cgi/files/root/usr/mww-fl/index.html (Revision 0)
- @@ -0,0 +1,3 @@
- +<head>
- +<meta http-equiv="refresh" content="0;URL=/cgi-bin/gui_download.cgi">
- +</head>
- \ No newline at end of file
- Eigenschaftsänderungen: make/fl-cgi/files/root/usr/mww-fl/index.html
- ___________________________________________________________________
- Hinzugefügt: svn:executable
- + *
- Index: make/fl-cgi/files/root/usr/mww/cgi-bin/fl
- ===================================================================
- --- make/fl-cgi/files/root/usr/mww/cgi-bin/fl (Revision 0)
- +++ make/fl-cgi/files/root/usr/mww/cgi-bin/fl (Revision 0)
- @@ -0,0 +1,5 @@
- +#!/bin/sh
- +. /usr/lib/libmodredir.sh
- +. /mod/etc/conf/fl.cfg
- +
- +redirect "http://$(self_host):${FL_PORT:-90}/" "Fritz!Load"
- Eigenschaftsänderungen: make/fl-cgi/files/root/usr/mww/cgi-bin/fl
- ___________________________________________________________________
- Hinzugefügt: svn:executable
- + *
- Index: make/fl-cgi/files/root/etc/default.fl/fl.inetd
- ===================================================================
- --- make/fl-cgi/files/root/etc/default.fl/fl.inetd (Revision 0)
- +++ make/fl-cgi/files/root/etc/default.fl/fl.inetd (Revision 0)
- @@ -0,0 +1,10 @@
- +. /mod/etc/conf/fl.cfg
- +inetdcfg_desc="Fritz!Load webinterface"
- +inetdcfg_port=$FL_PORT
- +inetdcfg_sock=stream
- +inetdcfg_proto=tcp$1
- +inetdcfg_flags=nowait
- +inetdcfg_user=root
- +inetdcfg_exe=/usr/bin/webcfg-fl
- +inetdcfg_arg0=webcfg-fl
- +inetdcfg_args="-i"
- Index: make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf
- ===================================================================
- --- make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf (Revision 0)
- +++ make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf (Revision 0)
- @@ -0,0 +1,2 @@
- +#!/bin/sh
- +echo "/:$MOD_HTTPD_USER:$MOD_HTTPD_PASSWD"
- Eigenschaftsänderungen: make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf
- ___________________________________________________________________
- Hinzugefügt: svn:executable
- + *
- Index: make/fl-cgi/files/root/etc/default.fl/fl.cfg
- ===================================================================
- --- make/fl-cgi/files/root/etc/default.fl/fl.cfg (Revision 0)
- +++ make/fl-cgi/files/root/etc/default.fl/fl.cfg (Revision 0)
- @@ -0,0 +1,2 @@
- +export FL_ENABLED='no'
- +export FL_PORT='90'
- Index: make/fl-cgi/files/root/etc/init.d/rc.fl
- ===================================================================
- --- make/fl-cgi/files/root/etc/init.d/rc.fl (Revision 0)
- +++ make/fl-cgi/files/root/etc/init.d/rc.fl (Revision 0)
- @@ -0,0 +1,50 @@
- +#!/bin/sh
- +
- +DAEMON=fl
- +DAEMON_BIN=httpd-$DAEMON
- +DAEMON_LONG_NAME="Fritz!Load webinterface"
- +DAEMON_CONFIG=/mod/etc/webcfg.conf
- +PID_FILE=/var/run/webcfg-${DAEMON}.pid
- +. /etc/init.d/modlibrc
- +
- +config() {
- + modlib_config httpd-${DAEMON}
- +}
- +
- +start() {
- + modlib_startdaemon webcfg-fl -P "$PID_FILE"
- +}
- +
- +case $1 in
- + ""|load)
- + modlib_add_httpd_symlink $DAEMON
- +
- + modreg cgi 'fl' 'Fritz!Load'
- + modreg daemon $DAEMON
- +
- + modlib_start $FL_ENABLED
- + ;;
- + unload)
- + modunreg daemon $DAEMON
- + modunreg cgi 'fl'
- + modlib_stop
- + ;;
- + start)
- + modlib_start
- + ;;
- + stop)
- + modlib_stop
- + ;;
- + restart)
- + modlib_restart
- + ;;
- + status)
- + modlib_status
- + ;;
- + *)
- + echo "Usage: $0 [load|unload|start|stop|restart|status]" 1>&2
- + exit 1
- + ;;
- +esac
- +
- +exit 0
- Eigenschaftsänderungen: make/fl-cgi/files/root/etc/init.d/rc.fl
- ___________________________________________________________________
- Hinzugefügt: svn:executable
- + *
Advertisement
Add Comment
Please, Sign In to add comment