Update upgrade-nginx.sh
This commit is contained in:
parent
de8084b4f7
commit
45b83af395
|
@ -53,9 +53,18 @@ git clone https://github.com/vozlt/nginx-module-vts \
|
||||||
|
|
||||||
cd "nginx-$VERSION" || exit 1
|
cd "nginx-$VERSION" || exit 1
|
||||||
|
|
||||||
|
U_VERSION=$(lsb_release -rs)
|
||||||
|
|
||||||
|
CC_OPT="-g -O2 -fPIE -fstack-protector -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2"
|
||||||
|
LD_OPT="-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now"
|
||||||
|
|
||||||
|
if [ "$U_VERSION" = "16.04" ];then
|
||||||
|
CC_OPT="-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2"
|
||||||
|
fi
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' \
|
--with-cc-opt="$CC_OPT" \
|
||||||
--with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' \
|
--with-ld-opt="$LD_OPT" \
|
||||||
--sbin-path=/usr/sbin/nginx \
|
--sbin-path=/usr/sbin/nginx \
|
||||||
--prefix=/usr/share/nginx \
|
--prefix=/usr/share/nginx \
|
||||||
--conf-path=/etc/nginx/nginx.conf \
|
--conf-path=/etc/nginx/nginx.conf \
|
||||||
|
|
Loading…
Reference in New Issue