Browse Source

Fix update oneinstack

lj2007331@gmail.com 7 years ago
parent
commit
123f2e7848
2 changed files with 5 additions and 3 deletions
  1. 4 2
      include/upgrade_oneinstack.sh
  2. 1 1
      versions.txt

+ 4 - 2
include/upgrade_oneinstack.sh

@@ -18,10 +18,12 @@ Upgrade_OneinStack() {
     [ -e /tmp/oneinstack.tar.gz ] && rm -rf /tmp/oneinstack.tar.gz
     wget -c http://mirrors.linuxeye.com/oneinstack.tar.gz -O /tmp/oneinstack.tar.gz > /dev/null 2>&1 
     tar xzf /tmp/oneinstack.tar.gz -C ../
+    IFS=$'\n'
     for L in `grep -vE '^#|^$' /tmp/options.conf`
     do
-      Key=`echo $L | awk -F= '{print $1}'`
-      Value=`echo $L | awk -F= '{print $2}'`
+      IFS=$IFS_old
+      Key="`echo ${L%%=*}`"
+      Value="`echo ${L#*=}`"
       sed -i "s@^${Key}=.*@${Key}=${Value}@" ./options.conf
     done
     rm -rf /tmp/{oneinstack.tar.gz,options.conf}

+ 1 - 1
versions.txt

@@ -1,7 +1,7 @@
 # newest software version
 # Web
 nginx_version=1.12.2
-tengine_version=2.2.1
+tengine_version=2.2.2
 openresty_version=1.13.6.1
 openssl_version=1.0.2n