app-version improved
Now we take the app-version from TAR file instead of instalation script.
This commit is contained in:
parent
70fda3e7aa
commit
4119e01829
2 changed files with 14 additions and 7 deletions
|
@ -2,7 +2,11 @@
|
|||
source /opt/webinoly/lib/general
|
||||
|
||||
|
||||
server_version() {
|
||||
app_version() {
|
||||
local app_ver="1.5.0-beta"
|
||||
echo $app_ver
|
||||
}
|
||||
svr_version() {
|
||||
local ser_ver="1.1"
|
||||
echo $ser_ver
|
||||
}
|
||||
|
@ -281,7 +285,7 @@ nginx_optim() {
|
|||
fi
|
||||
|
||||
linux_optim
|
||||
conf_write server-version $(server_version)
|
||||
conf_write server-version $(svr_version)
|
||||
conf_write nginx-optim true
|
||||
api-events_update in8
|
||||
}
|
||||
|
|
13
weby
13
weby
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Webinoly Installation Script.
|
||||
webyversion="1.5.0-beta"
|
||||
|
||||
|
||||
# Check OS support
|
||||
|
@ -74,15 +72,20 @@ source /opt/webinoly/lib/install
|
|||
# Check for Server Conf Updates and Save Tools Port after library is available.
|
||||
if [[ -a /opt/webinoly/webinoly.conf ]]; then
|
||||
echo "${gre}Webinoly Configuration file was found, so we will use it!${end}"
|
||||
newver=$(server_version)
|
||||
oldver=$(conf_read server-version)
|
||||
[[ ${newver//.} -gt ${oldver//.} ]] && source /opt/webinoly/lib/update
|
||||
# svr_version function was created at the same time as the first update of server-version. Not check before!
|
||||
if declare -F svr_version > /dev/null 2>&1; then
|
||||
newver=$(svr_version)
|
||||
oldver=$(conf_read server-version)
|
||||
[[ ${newver//.} -gt ${oldver//.} ]] && source /opt/webinoly/lib/update
|
||||
fi
|
||||
else
|
||||
[[ -n $2 && $2 != "-ver="* ]] && tools_port $2
|
||||
newinst="true"
|
||||
fi
|
||||
|
||||
# Write app version
|
||||
declare -F app_version > /dev/null 2>&1 && webyversion=$(app_version)
|
||||
[[ -z $webyversion ]] && webyversion="undetermined"
|
||||
conf_write app-version $webyversion
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue