Aller au contenu

yongbi

Membres
  • Inscription

  • Dernière visite

Messages posté(e)s par yongbi

  1. Posté(e)

    Merci pour ta réponse mais là je sèche.. j'ai vérifié j'ai bien nginx dans /usr/bin mais quand je lance le script :

    HPPROLIANT> ./nginx.sh start
    ./nginx.sh: line 55: usr/bin/nginx: not found
     

    HPPROLIANT> ls -lrt | grep -i nginx
    -rwxr-xr-x    1 root     root        673852 Apr 26  2016 nginx
     

    Et je suis connecté en root. donc je ne pige pas

     

    dans le sh j'ai mis  :

    PATH="/bin:/usr/bin"

    BASE="/usr/local"                      

    #   contourner la restriction AppArmor (DSM6)
    #SYSNGINX=/bin/nginx
    #NGINX=$BASE/bin/nginx
    #cp --update --archive $SYSNGINX $NGINX

    #DSM 5 seulement pour ligne suivante
    NGINX="usr/bin/nginx"

  2. Posté(e)

    Bonjour,

    Je suis en DSM 5.2 et impossible de lancer le script, j'obitens l'erreur suivante :

    nginx.sh: line 52: -p: not found

    Merci de toute aide

    contenu du script :

     

    #! /bin/ash
    #
    #   nginx local startup for DSM
    #  
    PATH="/bin:/usr/bin"

    BASE="/usr/local"                      

    #   contourner la restriction AppArmor (DSM6)
    #SYSNGINX=/bin/nginx
    #NGINX=$BASE/bin/nginx
    #cp --update --archive $SYSNGINX $NGINX

    PREFIX="$BASE/etc/nginx"
    CONF="$PREFIX/nginx.conf"
    PIDFILE="/var/run/nginx-local.pid"
    PROXY_TEMP_PATH="/var/lib/nginx-local/proxy"
    [ -f $CONF ] || exit 0

    if [ ! -d $PROXY_TEMP_PATH ] ; then
        mkdir -p $PROXY_TEMP_PATH
        chown http:http $PROXY_TEMP_PATH
        chmod u=rwx,g=rwx,o= $PROXY_TEMP_PATH
    fi

    action=$1
    #   build nginx arglist
    set -- -p $PREFIX -c $CONF -g "pid $PIDFILE;"
    case $action in
        start)
            [ -t 0 ] || exec >/tmp/nginx-startup.log 2>&1
            $NGINX "$@" && echo >&2  "nginx: $action"
            ;;
        stop|reload|quit)
            $NGINX "$@" -s $action && echo >&2  "nginx: $action"
            ;;
        restart)
            for action in stop start
            do
                $0   "$action"
            done
            ;;
        status)
            if [ -r $PIDFILE ] ; then
    #            ps -www -fp $(<$PIDFILE) # <ligne à utiliser en DSM6, suivante pour DSM5
                /bin/ps -w | awk -vpid="$(cat $PIDFILE)" '($1 == pid)'
            fi
            ;;
        *)
            echo "$0: unknown param \"$action\""
            ;;
    esac

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.