@@ -82,13 +82,13 @@ if [ "$NGINX_B" = true ] ; then
8282 cd $BUILD_DIR
8383
8484 # Check if target directory exist
85- if [ -d $BUILD_DIR /hestia-nginx_$HESTIA_V ]; then
86- # mv $BUILD_DIR/hestia-nginx_$HESTIA_V $BUILD_DIR/hestia-nginx_$HESTIA_V -$(timestamp)
87- rm -r $BUILD_DIR /hestia-nginx_$HESTIA_V
85+ if [ -d $BUILD_DIR /hestia-nginx_$NGINX_V ]; then
86+ # mv $BUILD_DIR/hestia-nginx_$NGINX_V $BUILD_DIR/hestia-nginx_$NGINX_V -$(timestamp)
87+ rm -r $BUILD_DIR /hestia-nginx_$NGINX_V
8888 fi
8989
9090 # Create directory
91- mkdir $BUILD_DIR /hestia-nginx_$HESTIA_V
91+ mkdir $BUILD_DIR /hestia-nginx_$NGINX_V
9292
9393 # Download and unpack source files
9494 wget -qO- $NGINX | tar xz
@@ -125,7 +125,7 @@ if [ "$NGINX_B" = true ] ; then
125125 rm -r nginx-$NGINX_V openssl-$OPENSSL_V pcre-$PCRE_V zlib-$ZLIB_V
126126
127127 # Prepare Deb Package Folder Structure
128- cd hestia-nginx_$HESTIA_V /
128+ cd hestia-nginx_$NGINX_V /
129129 mkdir -p usr/local/hestia etc/init.d DEBIAN
130130
131131 # Download control, postinst and postrm files
@@ -157,11 +157,11 @@ if [ "$NGINX_B" = true ] ; then
157157
158158 # change permission and build the package
159159 cd $BUILD_DIR
160- chown -R root:root hestia-nginx_$HESTIA_V
161- dpkg-deb --build hestia-nginx_$HESTIA_V
160+ chown -R root:root hestia-nginx_$NGINX_V
161+ dpkg-deb --build hestia-nginx_$NGINX_V
162162
163163 # clear up the source folder
164- rm -r hestia-nginx_$HESTIA_V
164+ rm -r hestia-nginx_$NGINX_V
165165fi
166166
167167# ################################################################################
@@ -175,13 +175,13 @@ if [ "$PHP_B" = true ] ; then
175175 cd $BUILD_DIR
176176
177177 # Check if target directory exist
178- if [ -d $BUILD_DIR /hestia-php_$HESTIA_V ]; then
179- # mv $BUILD_DIR/hestia-php_$HESTIA_V $BUILD_DIR/hestia-php_$HESTIA_V -$(timestamp)
180- rm -r $BUILD_DIR /hestia-php_$HESTIA_V
178+ if [ -d $BUILD_DIR /hestia-php_$PHP_V ]; then
179+ # mv $BUILD_DIR/hestia-php_$PHP_V $BUILD_DIR/hestia-php_$PHP_V -$(timestamp)
180+ rm -r $BUILD_DIR /hestia-php_$PHP_V
181181 fi
182182
183183 # Create directory
184- mkdir $BUILD_DIR /hestia-php_$HESTIA_V
184+ mkdir $BUILD_DIR /hestia-php_$PHP_V
185185
186186 # Download and unpack source files
187187 wget -qO- $PHP | tar xz
@@ -207,7 +207,7 @@ if [ "$PHP_B" = true ] ; then
207207 rm -r php-$PHP_V
208208
209209 # Prepare Deb Package Folder Structure
210- cd hestia-php_$HESTIA_V /
210+ cd hestia-php_$PHP_V /
211211 mkdir -p usr/local/hestia DEBIAN
212212
213213 # Download control, postinst and postrm files
@@ -230,11 +230,11 @@ if [ "$PHP_B" = true ] ; then
230230
231231 # change permission and build the package
232232 cd $BUILD_DIR
233- chown -R root:root hestia-php_$HESTIA_V
234- dpkg-deb --build hestia-php_$HESTIA_V
233+ chown -R root:root hestia-php_$PHP_V
234+ dpkg-deb --build hestia-php_$PHP_V
235235
236236 # clear up the source folder
237- rm -r hestia-php_$HESTIA_V
237+ rm -r hestia-php_$PHP_V
238238fi
239239
240240# ################################################################################
0 commit comments