$NetBSD: patch-bin_cppcms__run,v 1.1 2013/07/16 10:12:48 joerg Exp $ --- bin/cppcms_run.orig 2013-01-02 22:26:03.000000000 +0000 +++ bin/cppcms_run @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh ############################################################################ # @@ -8,8 +8,7 @@ # ############################################################################ -locate_server() -{ +locate_server() { NAME=$1 if [ "$WEB_SERVER" != "" ] ; then return @@ -29,7 +28,7 @@ locate_server() return fi done - if [ "$2" == "exit" ] ; then + if [ "$2" = "exit" ] ; then echo "Failed to locate server $NAME, exitting" echo "Try providing PATH valiable" exit 1 @@ -39,7 +38,7 @@ locate_server() lighttpd() { locate_server lighttpd $1 -[ "$WEB_SERVER" == "" ] && return +[ "$WEB_SERVER" = "" ] && return CONFIG_FILE=$DIR/lighty.conf @@ -47,7 +46,7 @@ case $API in fastcgi) ;; scgi) ;; http) if [ "$SOCKET" != "" ]; then - if [ "$1" == "exit" ]; then + if [ "$1" = "exit" ]; then echo "http is supported over TCP/IP only" ; exit 1 else WEB_SERVER="" @@ -57,7 +56,7 @@ case $API in ;; *) - if [ "$1" == "exit" ]; then + if [ "$1" = "exit" ]; then echo "Mod $API is not supported by lightppd" ; exit 1 else WEB_SERVER="" @@ -66,7 +65,7 @@ case $API in ;; esac -if [ "$API" == "http" ]; then +if [ "$API" = "http" ]; then LIGHTTPD_MODULE=proxy else LIGHTTPD_MODULE=$API @@ -175,12 +174,12 @@ nginx() locate_server nginx $1 -[ "$WEB_SERVER" == "" ] && return +[ "$WEB_SERVER" = "" ] && return case $API in fastcgi) ;; scgi) if [ "$HTTP_HEADERS" != "true" ] ; then - if [ "$1" == "exit" ]; then + if [ "$1" = "exit" ]; then echo "service.generate_http_headers is false, nginx SCGI module requires it to be set to true" exit 1 else @@ -190,7 +189,7 @@ case $API in fi ;; http) if [ "$SOCKET" != "" ]; then - if [ "$1" == "exit" ]; then + if [ "$1" = "exit" ]; then echo "http is supported over TCP/IP only" ; exit 1 else WEB_SERVER="" @@ -200,8 +199,8 @@ case $API in ;; *) - if [ "$1" == "exit" ]; then - echo "Mod $API is not supported by lightppd" ; exit 1 + if [ "$1" = "exit" ]; then + echo "Mod $API is not supported by nginx" ; exit 1 else WEB_SERVER="" return @@ -289,7 +288,7 @@ http { } EOF -if [ "$API" == "fastcgi" ]; then +if [ "$API" = "fastcgi" ]; then cat >>$CONFIG_FILE <>$CONFIG_FILE <>$CONFIG_FILE <$DIR/apache.conf << EOF LoadModule mime_module $APACHE_MOD_DIR/mod_mime.$APACHE_MOD_EXT EOF -if [ "$API" == "fastcgi" ]; +if [ "$API" = "fastcgi" ]; then @@ -529,7 +527,7 @@ cat >>$DIR/apache.conf <>$DIR/apache.conf <