ソースを参照

Adjust to load hestia conf version instead dpkg.

Raphael Schneeberger 6 年 前
コミット
97ad628247
2 ファイル変更7 行追加10 行削除
  1. 1 6
      install/upgrade/1.00.0-190618.sh
  2. 6 4
      install/upgrade/1.00.0-190621.sh

+ 1 - 6
install/upgrade/1.00.0-190618.sh

@@ -15,13 +15,8 @@ hestiacp="$HESTIA/install/deb"
 # Load hestia.conf
 source /usr/local/hestia/conf/hestia.conf
 
-# Get hestia version
-version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
-
-function version_ge(){ test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -o ! -z "$1" -a "$1" = "$2"; }
-
 # Compare version for upgrade routine
-if [ "$version" != "0.9.8-28" ]; then
+if [ "$VERSION" != "0.9.8-28" ]; then
     source $HESTIA/install/upgrade/0.9.8-28.sh
 fi
 

+ 6 - 4
install/upgrade/1.00.0-190621.sh

@@ -15,14 +15,16 @@ hestiacp="$HESTIA/install/deb"
 # Load hestia.conf
 source /usr/local/hestia/conf/hestia.conf
 
-# Get hestia version
-version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
-
 # Compare version for upgrade routine
-if [ "$version" != "1.00.0-190618" ] && [ "$version" != "0.10.0" ] then
+if [ "$VERSION" != "1.00.0-190618" ] && [ "$VERSION" != "0.10.0" ] then
     source $HESTIA/install/upgrade/1.00.0-190618.sh
 fi
 
+# Get hestia version
+version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
+
+# To Do: Write version to hestia.conf.
+
 # Place additional commands below.
 
 # Remove global options from nginx.conf to prevent conflicts with other web packages