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