mirror of
https://github.com/xdtianyu/scripts.git
synced 2025-09-22 20:09:22 +08:00
Update upgrade-nginx.sh
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VERSION="1.9.5"
|
VERSION="1.10.0"
|
||||||
OLD_VERSION=$(nginx -v 2>&1|cut -d '/' -f 2)
|
OLD_VERSION=$(nginx -v 2>&1|cut -d '/' -f 2)
|
||||||
|
|
||||||
SSL_VERSION="1.0.2d"
|
SSL_VERSION="1.0.2g"
|
||||||
ZLIB_VERSION="1.2.8"
|
ZLIB_VERSION="1.2.8"
|
||||||
|
|
||||||
cd
|
cd
|
||||||
@@ -77,6 +77,11 @@ make
|
|||||||
echo "Stop service ..."
|
echo "Stop service ..."
|
||||||
service nginx stop
|
service nginx stop
|
||||||
cd /etc
|
cd /etc
|
||||||
|
|
||||||
|
if [ -d "nginx-$OLD_VERSION" ];then
|
||||||
|
mv "nginx-$OLD_VERSION" "nginx-$OLD_VERSION-$(date +%m%d)"
|
||||||
|
fi
|
||||||
|
|
||||||
mv nginx nginx-$OLD_VERSION
|
mv nginx nginx-$OLD_VERSION
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user