src/Tools/WWW_Find/lib/Tools/wwwfind
changeset 51085 d90218288d51
parent 43075 6fde0c323c15
child 52057 69137d20ab0b
equal deleted inserted replaced
51084:cbae5c5ffd23 51085:d90218288d51
   122 
   122 
   123 ## main
   123 ## main
   124 
   124 
   125 WWWPORT=`sed -e 's/[ 	]*//g' -ne 's/server.port=\([0-9][0-9]*\),\?/\1/p' "$WWWCONFIG"`
   125 WWWPORT=`sed -e 's/[ 	]*//g' -ne 's/server.port=\([0-9][0-9]*\),\?/\1/p' "$WWWCONFIG"`
   126 SCGIPORT=`sed -e 's/[ 	]*//g' -ne 's/"port"=>\([0-9][0-9]*\),\?/\1/p' "$WWWCONFIG"`
   126 SCGIPORT=`sed -e 's/[ 	]*//g' -ne 's/"port"=>\([0-9][0-9]*\),\?/\1/p' "$WWWCONFIG"`
   127 MLSTARTSERVER="YXML_Find_Theorems.init (); ScgiServer.server' 10 \"/\" $SCGIPORT;"
   127 
       
   128 # inform theory which SCGI port to use via environment variable
       
   129 export SCGIPORT
       
   130 MLSTARTSERVER="use_thy \"Start_WWW_Find\";"
   128 
   131 
   129 case "$COMMAND" in
   132 case "$COMMAND" in
   130   start)
   133   start)
   131     "$LIGHTTPD" -f "$WWWCONFIG"
   134     "$LIGHTTPD" -f "$WWWCONFIG"
   132     if [ "$LOGFILE" = true ]; then
   135     if [ "$LOGFILE" = true ]; then
   133       (cd "$WWWFINDDIR"; \
   136       (cd "$WWWFINDDIR"; \
   134        nohup "$ISABELLE_PROCESS" -r -u -e "$MLSTARTSERVER" "$INPUT") &
   137        nohup "$ISABELLE_PROCESS" -r -e "$MLSTARTSERVER" "$INPUT") &
   135     else
   138     else
   136       (cd "$WWWFINDDIR"; \
   139       (cd "$WWWFINDDIR"; \
   137        nohup "$ISABELLE_PROCESS" -r -u -e "$MLSTARTSERVER" \
   140        nohup "$ISABELLE_PROCESS" -r -e "$MLSTARTSERVER" \
   138          "$INPUT" > /dev/null 2> /dev/null) &
   141          "$INPUT" > /dev/null 2> /dev/null) &
   139     fi
   142     fi
   140     ;;
   143     ;;
   141   stop)
   144   stop)
   142     kill_by_port $SCGIPORT
   145     kill_by_port $SCGIPORT