Update upgrade-nginx-deb.sh

This commit is contained in:
tianyu 2016-04-27 10:14:36 +08:00
parent 106067c797
commit 08a88407ae
1 changed files with 2 additions and 2 deletions

View File

@ -10,13 +10,13 @@ service nginx stop
cd /etc || exit 1 cd /etc || exit 1
if [ -d "nginx-$OLD_VERSION" ];then if [ -d "nginx-$OLD_VERSION" ];then
mv "nginx-$OLD_VERSION" "nginx-$OLD_VERSION-$(date +%m%d)" mv "nginx-$OLD_VERSION" "nginx-$OLD_VERSION-$(date +%m%d%M%S)"
fi fi
mv nginx "nginx-$OLD_VERSION" mv nginx "nginx-$OLD_VERSION"
cd - || exit 1 cd - || exit 1
dpkg -i nginx_"$VERSION"-1_amd64.deb dpkg --force-overwrite -i nginx_"$VERSION"-1_amd64.deb
cd /etc || exit 1 cd /etc || exit 1
mv nginx "nginx-$VERSION" mv nginx "nginx-$VERSION"