diff options
-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 |