diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-15 17:26:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-15 17:31:43 +0300 |
commit | f9b7c3ed0bb5081634fa1f14e62b411fbf4eadc7 (patch) | |
tree | 1fbc5dae42dd727c185508aa33d17cea3e0e46e8 /localserver | |
parent | b23943fe270d017fbc1448a36154553ee047b48a (diff) | |
download | evol-tools-f9b7c3ed0bb5081634fa1f14e62b411fbf4eadc7.tar.gz evol-tools-f9b7c3ed0bb5081634fa1f14e62b411fbf4eadc7.tar.bz2 evol-tools-f9b7c3ed0bb5081634fa1f14e62b411fbf4eadc7.tar.xz evol-tools-f9b7c3ed0bb5081634fa1f14e62b411fbf4eadc7.zip |
localserver: add updateconfigs.sh script
Diffstat (limited to 'localserver')
-rw-r--r-- | localserver/README | 1 | ||||
-rwxr-xr-x | localserver/installconfigs.sh | 2 | ||||
-rwxr-xr-x | localserver/updateconfigs.sh | 15 |
3 files changed, 18 insertions, 0 deletions
diff --git a/localserver/README b/localserver/README index 04ea81d..239d561 100644 --- a/localserver/README +++ b/localserver/README @@ -6,6 +6,7 @@ givegm.sh - give gm rights to first account created on server. initdb.sh - initialize mariadb database. installconfigs.sh - install configurations into server data directory. updatedb.sh - update if need sql database +updateconfigs.sh - update if need server data configuration See also http://wiki.evolonline.org/guidelines/installmariadb http://wiki.evolonline.org/guidelines/localserver diff --git a/localserver/installconfigs.sh b/localserver/installconfigs.sh index cedfb79..d0c221c 100755 --- a/localserver/installconfigs.sh +++ b/localserver/installconfigs.sh @@ -6,3 +6,5 @@ export CONF="$SD/conf/import" mkdir $CONF cp conf/*.txt $CONF cp -f conf/inter_conf.txt $CONF +cp -f ${SD}/conf/channels.conf.base ${SD}/conf/channels.conf +echo "1" >versions/confver
\ No newline at end of file diff --git a/localserver/updateconfigs.sh b/localserver/updateconfigs.sh new file mode 100755 index 0000000..a6f8a73 --- /dev/null +++ b/localserver/updateconfigs.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +export VER=$(cat versions/confver 2>/dev/null) +export CONFDIR="../../server-data/" + +if [[ -z "${VER}" ]]; then + export VER="0" + mkdir versions +fi + +if [ "${VER}" -lt "1" ]; then + cp -f ${CONFDIR}/conf/channels.conf ${CONFDIR}/conf/channels.conf.bak + cp -f ${CONFDIR}/conf/channels.conf.base ${CONFDIR}/conf/channels.conf + echo "1" >versions/confver +fi |