Guest User

Untitled

a guest
Mar 4th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.22 KB | None | 0 0
  1. Index: make/fl-cgi/fl-cgi.mk
  2. ===================================================================
  3. --- make/fl-cgi/fl-cgi.mk (Revision 0)
  4. +++ make/fl-cgi/fl-cgi.mk (Revision 0)
  5. @@ -0,0 +1,12 @@
  6. +$(call PKG_INIT_BIN,0.1)
  7. +$(PKG)_CATEGORY:=Web interfaces
  8. +
  9. +$(PKG_UNPACKED)
  10. +
  11. +$(pkg):
  12. +
  13. +$(pkg)-precompiled:
  14. +
  15. +$(pkg)-clean:
  16. +
  17. +$(PKG_FINISH)
  18. Index: make/fl-cgi/Config.in
  19. ===================================================================
  20. --- make/fl-cgi/Config.in (Revision 0)
  21. +++ make/fl-cgi/Config.in (Revision 0)
  22. @@ -0,0 +1,6 @@
  23. +config FREETZ_PACKAGE_FL_CGI
  24. + bool "Fritz!Load CGI 0.1"
  25. + default n
  26. + help
  27. + Provides a hook outside AVMs web structure to Fritz!Load.
  28. + When Fritz!Load uses this hook, it becomes available on port 90
  29. Index: make/fl-cgi/files/.language
  30. ===================================================================
  31. --- make/fl-cgi/files/.language (Revision 0)
  32. +++ make/fl-cgi/files/.language (Revision 0)
  33. @@ -0,0 +1,8 @@
  34. +languages
  35. +{ de en }
  36. +default
  37. +{ en }
  38. +files
  39. +{
  40. + usr/lib/cgi-bin/fl.cgi
  41. +}
  42. Index: make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi
  43. ===================================================================
  44. --- make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi (Revision 0)
  45. +++ make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi (Revision 0)
  46. @@ -0,0 +1,42 @@
  47. +#!/bin/sh
  48. +
  49. +
  50. +. /usr/lib/libmodcgi.sh
  51. +
  52. +check "$FL_ENABLED" yes:auto inetd "*":man
  53. +
  54. +sec_begin '$(lang de:"Starttyp" en:"Start type")'
  55. +
  56. +cat << EOF
  57. +<p>
  58. +<input id="e1" type="radio" name="enabled" value="yes"$auto_chk><label for="e1"> $(lang de:"Automatisch" en:"Automatic")</label>
  59. +<input id="e2" type="radio" name="enabled" value="no"$man_chk><label for="e2"> $(lang de:"Manuell" en:"Manual")</label>
  60. +EOF
  61. +[ -e /mod/etc/default.inetd/inetd.cfg ] &&
  62. +cat << EOF
  63. +<input id="e3" type="radio" name="enabled" value="inetd"$inetd_chk><label for="e3"> $(lang de:"Inetd" en:"Inetd")</label>
  64. +EOF
  65. +cat << EOF
  66. +</p>
  67. +EOF
  68. +
  69. +sec_end
  70. +
  71. +sec_begin '$(lang de:"Anzeigen" en:"Show")'
  72. +
  73. +cat << EOF
  74. +<ul>
  75. +<li><a href="/cgi-bin/fl" target="_blank">$(lang de:"Fritz!Load-Webinterface" en:"Fritz!Load web interface")</a></li>
  76. +</ul>
  77. +EOF
  78. +
  79. +sec_end
  80. +
  81. +sec_begin '$(lang de:"Fritz!Load Interface" en:"Fritz!Load interface")'
  82. +
  83. +cat << EOF
  84. +<h2>$(lang de:"Port des Fritz!Load-Webservers" en:"Port of Fritz!Load webserver"):</h2>
  85. +<p>Port: <input type="text" name="port" size="5" maxlength="5" value="$(html "$FL_PORT")"></p>
  86. +EOF
  87. +
  88. +sec_end
  89.  
  90. Eigenschaftsänderungen: make/fl-cgi/files/root/usr/lib/cgi-bin/fl.cgi
  91. ___________________________________________________________________
  92. Hinzugefügt: svn:executable
  93. + *
  94.  
  95. Index: make/fl-cgi/files/root/usr/bin/webcfg-fl
  96. ===================================================================
  97. --- make/fl-cgi/files/root/usr/bin/webcfg-fl (Revision 0)
  98. +++ make/fl-cgi/files/root/usr/bin/webcfg-fl (Revision 0)
  99. @@ -0,0 +1,19 @@
  100. +#!/bin/sh
  101. +
  102. +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/mod/sbin:/mod/bin:/mod/usr/sbin:/mod/usr/bin
  103. +export LD_LIBRARY_PATH=/mod/lib
  104. +
  105. +DAEMON=fl
  106. +DAEMON_BIN=httpd-$DAEMON
  107. +DAEMON_ENV="PATH=$PATH"
  108. +
  109. +
  110. +if [ ! -r "/mod/etc/conf/${DAEMON}.cfg" ]; then
  111. + echo "Error[$DAEMON]: not configured" 1>&2
  112. + exit 1
  113. +fi
  114. +. /mod/etc/conf/${DAEMON}.cfg
  115. +
  116. +homedir=/usr/mww-${DAEMON}/
  117. +
  118. +exec env - $DAEMON_ENV $DAEMON_BIN "$@" -p "$FL_PORT" -c /mod/etc/webcfg.conf -h "$homedir" -r "FritzLoad" 2>/dev/null
  119.  
  120. Eigenschaftsänderungen: make/fl-cgi/files/root/usr/bin/webcfg-fl
  121. ___________________________________________________________________
  122. Hinzugefügt: svn:executable
  123. + *
  124.  
  125. Index: make/fl-cgi/files/root/usr/mww-fl/index.html
  126. ===================================================================
  127. --- make/fl-cgi/files/root/usr/mww-fl/index.html (Revision 0)
  128. +++ make/fl-cgi/files/root/usr/mww-fl/index.html (Revision 0)
  129. @@ -0,0 +1,3 @@
  130. +<head>
  131. +<meta http-equiv="refresh" content="0;URL=/cgi-bin/gui_download.cgi">
  132. +</head>
  133. \ No newline at end of file
  134.  
  135. Eigenschaftsänderungen: make/fl-cgi/files/root/usr/mww-fl/index.html
  136. ___________________________________________________________________
  137. Hinzugefügt: svn:executable
  138. + *
  139.  
  140. Index: make/fl-cgi/files/root/usr/mww/cgi-bin/fl
  141. ===================================================================
  142. --- make/fl-cgi/files/root/usr/mww/cgi-bin/fl (Revision 0)
  143. +++ make/fl-cgi/files/root/usr/mww/cgi-bin/fl (Revision 0)
  144. @@ -0,0 +1,5 @@
  145. +#!/bin/sh
  146. +. /usr/lib/libmodredir.sh
  147. +. /mod/etc/conf/fl.cfg
  148. +
  149. +redirect "http://$(self_host):${FL_PORT:-90}/" "Fritz!Load"
  150.  
  151. Eigenschaftsänderungen: make/fl-cgi/files/root/usr/mww/cgi-bin/fl
  152. ___________________________________________________________________
  153. Hinzugefügt: svn:executable
  154. + *
  155.  
  156. Index: make/fl-cgi/files/root/etc/default.fl/fl.inetd
  157. ===================================================================
  158. --- make/fl-cgi/files/root/etc/default.fl/fl.inetd (Revision 0)
  159. +++ make/fl-cgi/files/root/etc/default.fl/fl.inetd (Revision 0)
  160. @@ -0,0 +1,10 @@
  161. +. /mod/etc/conf/fl.cfg
  162. +inetdcfg_desc="Fritz!Load webinterface"
  163. +inetdcfg_port=$FL_PORT
  164. +inetdcfg_sock=stream
  165. +inetdcfg_proto=tcp$1
  166. +inetdcfg_flags=nowait
  167. +inetdcfg_user=root
  168. +inetdcfg_exe=/usr/bin/webcfg-fl
  169. +inetdcfg_arg0=webcfg-fl
  170. +inetdcfg_args="-i"
  171. Index: make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf
  172. ===================================================================
  173. --- make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf (Revision 0)
  174. +++ make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf (Revision 0)
  175. @@ -0,0 +1,2 @@
  176. +#!/bin/sh
  177. +echo "/:$MOD_HTTPD_USER:$MOD_HTTPD_PASSWD"
  178.  
  179. Eigenschaftsänderungen: make/fl-cgi/files/root/etc/default.fl/httpd-fl_conf
  180. ___________________________________________________________________
  181. Hinzugefügt: svn:executable
  182. + *
  183.  
  184. Index: make/fl-cgi/files/root/etc/default.fl/fl.cfg
  185. ===================================================================
  186. --- make/fl-cgi/files/root/etc/default.fl/fl.cfg (Revision 0)
  187. +++ make/fl-cgi/files/root/etc/default.fl/fl.cfg (Revision 0)
  188. @@ -0,0 +1,2 @@
  189. +export FL_ENABLED='no'
  190. +export FL_PORT='90'
  191. Index: make/fl-cgi/files/root/etc/init.d/rc.fl
  192. ===================================================================
  193. --- make/fl-cgi/files/root/etc/init.d/rc.fl (Revision 0)
  194. +++ make/fl-cgi/files/root/etc/init.d/rc.fl (Revision 0)
  195. @@ -0,0 +1,50 @@
  196. +#!/bin/sh
  197. +
  198. +DAEMON=fl
  199. +DAEMON_BIN=httpd-$DAEMON
  200. +DAEMON_LONG_NAME="Fritz!Load webinterface"
  201. +DAEMON_CONFIG=/mod/etc/webcfg.conf
  202. +PID_FILE=/var/run/webcfg-${DAEMON}.pid
  203. +. /etc/init.d/modlibrc
  204. +
  205. +config() {
  206. + modlib_config httpd-${DAEMON}
  207. +}
  208. +
  209. +start() {
  210. + modlib_startdaemon webcfg-fl -P "$PID_FILE"
  211. +}
  212. +
  213. +case $1 in
  214. + ""|load)
  215. + modlib_add_httpd_symlink $DAEMON
  216. +
  217. + modreg cgi 'fl' 'Fritz!Load'
  218. + modreg daemon $DAEMON
  219. +
  220. + modlib_start $FL_ENABLED
  221. + ;;
  222. + unload)
  223. + modunreg daemon $DAEMON
  224. + modunreg cgi 'fl'
  225. + modlib_stop
  226. + ;;
  227. + start)
  228. + modlib_start
  229. + ;;
  230. + stop)
  231. + modlib_stop
  232. + ;;
  233. + restart)
  234. + modlib_restart
  235. + ;;
  236. + status)
  237. + modlib_status
  238. + ;;
  239. + *)
  240. + echo "Usage: $0 [load|unload|start|stop|restart|status]" 1>&2
  241. + exit 1
  242. + ;;
  243. +esac
  244. +
  245. +exit 0
  246.  
  247. Eigenschaftsänderungen: make/fl-cgi/files/root/etc/init.d/rc.fl
  248. ___________________________________________________________________
  249. Hinzugefügt: svn:executable
  250. + *
Advertisement
Add Comment
Please, Sign In to add comment