summaryrefslogtreecommitdiff
path: root/status.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-15 17:39:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-15 17:39:00 +0300
commit19964a628ebd7729ca35657831b09a739b77fe17 (patch)
tree3c0d63d54cc3516b1f33461b70bc85a612e0c879 /status.sh
parent34a2f1977472a063c5b15c02ab1c83a6961efbcb (diff)
downloadall-19964a628ebd7729ca35657831b09a739b77fe17.tar.gz
all-19964a628ebd7729ca35657831b09a739b77fe17.tar.bz2
all-19964a628ebd7729ca35657831b09a739b77fe17.tar.xz
all-19964a628ebd7729ca35657831b09a739b77fe17.zip
Add check for configuration version.
Diffstat (limited to 'status.sh')
-rwxr-xr-xstatus.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/status.sh b/status.sh
index 7ebe604..9ce9aca 100755
--- a/status.sh
+++ b/status.sh
@@ -7,6 +7,11 @@ function reportdb {
echo -e " \e[1;31mPlease upgrade database. See instuctions in http://wiki.evolonline.org/guidelines/updating#update_database\e[0m"
}
+function reportconf {
+ echo "server-data configuration"
+ echo -e " \e[1;31mPlease upgrade configuration. See instuctions in http://wiki.evolonline.org/guidelines/updating#update_configuration\e[0m"
+}
+
function dbinfo {
if [ ! -d "tools" ]; then
return
@@ -22,6 +27,21 @@ function dbinfo {
reportdb
}
+function configsinfo {
+ if [ ! -d "tools" ]; then
+ return
+ fi
+ export VER=$(cat tools/localserver/versions/confver 2>/dev/null)
+
+ if [[ -n "${VER}" ]]; then
+ if [ "${VER}" -lt "1" ]; then
+ reportconf
+ fi
+ return
+ fi
+ reportconf
+}
+
function status {
if [ ! -d "$1" ]; then
return
@@ -68,3 +88,4 @@ status art art
status manaplus manaplus
status media media
dbinfo
+configsinfo