diff --git a/builder/debian/stretch/x86_64/Dockerfile b/builder/debian/stretch/x86_64/Dockerfile
index dfa4ae4..0ea38f2 100644
--- a/builder/debian/stretch/x86_64/Dockerfile
+++ b/builder/debian/stretch/x86_64/Dockerfile
@@ -32,7 +32,7 @@ ENV HOSTNAME builder
RUN apt-get update ; \
apt-get dist-upgrade -y; \
- DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 apache2-utils autoconf autogen automake bison build-essential cmake cpputest default-libmysqlclient-dev fakeroot git libapache2-mod-php libboost-all-dev libfreetype6-dev libgif-dev libgl1-mesa-dev libjpeg62-turbo-dev liblua5.2-0 liblua5.2-dev liblzma-dev libogg-dev libopenal-dev libpng-dev libssh2-1-dev libssl-dev libtool libtool-bin libvorbis-dev libx11-dev libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxxf86vm-dev mercurial mysql-server php php-gd php-imagick php-mysql rrdtool unzip wget zlib1g-dev
+ DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 apache2-utils autoconf autogen automake bison build-essential cmake cpputest default-libmysqlclient-dev fakeroot git libapache2-mod-php libboost-all-dev libfreetype6-dev libgif-dev libgl1-mesa-dev libjpeg62-turbo-dev liblua5.2-0 liblua5.2-dev liblzma-dev libogg-dev libopenal-dev libpng-dev libssh2-1-dev libssl-dev libtool libtool-bin libvorbis-dev libx11-dev libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxxf86vm-dev mercurial mysql-server php php-gd php-imagick php-mysql python3 python3-pip python3-bcrypt python3-venv rrdtool unzip wget zlib1g-dev python3-coverage python3-pep8
## Build & Install cpptest
# Impossible to build release 1.1.0, 1.1.1, 1.1.2
diff --git a/builder/debian/stretch/x86_64/build-under-docker.sh b/builder/debian/stretch/x86_64/build-under-docker.sh
index db8d1e8..514fe42 100755
--- a/builder/debian/stretch/x86_64/build-under-docker.sh
+++ b/builder/debian/stretch/x86_64/build-under-docker.sh
@@ -20,8 +20,11 @@
declare DIRBUILD="/opt/build/"
declare DIRCODEUSE="/opt/build/opennel-code"
declare DIRCODE="/opt/ref/opennel-code"
+declare DIRPYMANAGER="/opt/ref/opennel-pymanager"
declare CXXFLAGS=""
declare -i DONTCOPYSOURCE=0
+declare -i BUILD_OPENNEL_CODE=1
+declare -i PACKAGE_OPENNEL_PYMANAGER=1
function usage()
{
@@ -126,6 +129,10 @@ do
DIRCODE="${1#*=}"
shift
;;
+ --opennel-pymanager-dir=*)
+ DIRPYMANAGER="${1#*=}"
+ shift
+ ;;
--cxxflags=*)
CXXFLAGS="$CXXFLAGS ${1#*=}"
shift
@@ -135,6 +142,14 @@ do
DIRCODEUSE="$DIRCODE"
shift
;;
+ --disable-build-opennel-code)
+ BUILD_OPENNEL_CODE=0
+ shift
+ ;;
+ --disable-package-opennel-pymanager)
+ PACKAGE_OPENNEL_PYMANAGER=0
+ shift
+ ;;
*)
msg_error "options '$1' not recognize"
usage
@@ -147,6 +162,7 @@ declare LOGFILE="${DIRBUILD}/build.log"
msg_debug "DIRBUILD:$DIRBUILD"
msg_debug "DIRCODE:$DIRCODE"
+msg_debug "DIRPYMANAGER:$DIRPYMANAGER"
msg_debug "CMAKEOPTS:$CMAKEOPTS"
msg_debug "MAKEOPTS:$MAKEOPTS"
msg_debug "LOGFILE:$LOGFILE"
@@ -156,23 +172,35 @@ msg_debug "DONTCOPYSOURCE:$DONTCOPYSOURCE"
msg_info "CREATE BUILD DIRECTORY"
mkdir -p ${DIRBUILD}/ || exit 2
-if [[ $DONTCOPYSOURCE -eq 0 ]]
+if [[ $PACKAGE_OPENNEL_PYMANAGER -ne 0 ]]
then
- msg_info "COPY CODE"
- mkdir -p ${DIRBUILD}/opennel-code
- cp -pr $DIRCODE/* ${DIRBUILD}/opennel-code
+ msg_info "PACKAGE OPENNEL-PYMANAGER"
+ mkdir -p /tmp/pymanager/tmp || exit 2
+ cp -pr $DIRPYMANAGER/* /tmp/pymanager || exit 2
+ msg_debug "cd /tmp/pymanager; `which python3` setup.py bdist_wheel -d ${DIRBUILD} -b /tmp"
+ cd /tmp/pymanager; `which python3` setup.py bdist_wheel -d ${DIRBUILD} -b /tmp/pymanager/tmp || exit 2
fi
-msg_info "PATCH CODE"
-for patchfile in $(cat ${DIRCODEUSE}/patch/series)
-do
- cd ${DIRCODEUSE}
- patch_onlyifnotapply ${DIRCODEUSE}/patch/$patchfile
-done
+if [[ $BUILD_OPENNEL_CODE -ne 0 ]]
+then
+ if [[ $DONTCOPYSOURCE -eq 0 ]]
+ then
+ msg_info "COPY CODE"
+ DIRCODEUSE="$DIRBUILD/opennel-code"
+ mkdir -p ${DIRBUILD}/opennel-code || exit 2
+ cp -pr $DIRCODE/* ${DIRBUILD}/opennel-code || exit 2
+ fi
-msg_info "PREPARE BUILD"
-msg_debug "cmake option : -DWITH_NEL=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_SYMBOLS=ON -DWITH_LUA52=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_CUSTOM_PATCH_SERVER=ON ${CMAKEOPTS}"
-cd ${DIRBUILD}; CXXFLAGS="$CXXFLAGS" cmake -DWITH_NEL=ON \
+ msg_info "PATCH CODE"
+ for patchfile in $(cat ${DIRCODE}/patch/series)
+ do
+ cd ${DIRCODEUSE}
+ patch_onlyifnotapply ${DIRCODE}/patch/$patchfile || exit 2
+ done
+
+ msg_info "PREPARE BUILD"
+ msg_debug "cd ${DIRBUILD}; CXXFLAGS="$CXXFLAGS" cmake -DWITH_NEL=ON -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_STATIC_EXTERNAL=ON -DWITH_SYMBOLS=ON -DWITH_LUA52=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_CUSTOM_PATCH_SERVER=ON ${CMAKEOPTS} ${DIRCODEUSE}/code 1>>$LOGFILE 2>&1 "
+ cd ${DIRBUILD}; CXXFLAGS="$CXXFLAGS" cmake -DWITH_NEL=ON \
-DWITH_STATIC=ON \
-DWITH_STATIC_DRIVERS=ON \
-DWITH_STATIC_EXTERNAL=ON \
@@ -183,9 +211,10 @@ cd ${DIRBUILD}; CXXFLAGS="$CXXFLAGS" cmake -DWITH_NEL=ON \
${CMAKEOPTS} \
${DIRCODEUSE}/code 1>>$LOGFILE 2>&1 || exit 2
-msg_info "BUILD START"
-msg_debug "make option : $MAKEOPTS"
-cd ${DIRBUILD}; VERBOSE=1 make $MAKEOPTS 1>>$LOGFILE 2>&1 || exit 2
+ msg_info "BUILD START"
+ msg_debug "make option : $MAKEOPTS"
+ cd ${DIRBUILD}; VERBOSE=1 make $MAKEOPTS 1>>$LOGFILE 2>&1 || exit 2
+fi
trap '' EXIT
msg_info "BUILD END"
diff --git a/builder/debian/stretch/x86_64/build.sh b/builder/debian/stretch/x86_64/build.sh
index f6cbc0f..d88f344 100755
--- a/builder/debian/stretch/x86_64/build.sh
+++ b/builder/debian/stretch/x86_64/build.sh
@@ -67,6 +67,9 @@ options:
-m OPTS, --add-opts-docker=OPTS : Adding options on docker command (when build)
--only-build-server : adding option to build only server
--opennel-code-dir= : localization code khanat (khanat-opennel-code)
+ --opennel-pymanager-dir= : localization code khanat (opennel-pymanager)
+ --disable-build-opennel-code : Disable build on opennel-code
+ --disable-package-opennel-pymanager : Disable package on opennel-pymanager
--dont-copy-source : disable copy source, work directly on source (apply patch)
Example :
@@ -104,6 +107,7 @@ calldir="$(dirname $0)"
basedir=$(cd $calldir; pwd)
rootdir="$(dirname $(dirname $(dirname $(dirname ${basedir}))))"
codedir="$(dirname $rootdir)/khanat-opennel-code"
+pymanagerdir="$(dirname $rootdir)/opennel-pymanager"
while test $# -gt 0
do
@@ -189,6 +193,10 @@ do
codedir="${1#*=}"
shift
;;
+ --opennel-pymanager-dir=*)
+ pymanagerdir="${1#*=}"
+ shift
+ ;;
-w|--clean-images-none)
CLEANIMAGENONE=1
shift
@@ -198,6 +206,14 @@ do
OPTION="$OPTION --dont-copy-source"
shift
;;
+ --disable-build-opennel-code)
+ OPTION="$OPTION --disable-build-opennel-code"
+ shift
+ ;;
+ --disable-package-opennel-pymanager)
+ OPTION="$OPTION --disable-package-opennel-pymanager"
+ shift
+ ;;
*)
msg_error "options '$1' not recognize"
usage
@@ -240,6 +256,7 @@ msg_debug "[$(basename $0):$LINENO] CMAKEOPTS: '$CMAKEOPTS'"
msg_debug "[$(basename $0):$LINENO] DOCKEROPTS: '$DOCKEROPTS'"
msg_debug "[$(basename $0):$LINENO] DOCKERBUILDOPT: '$DOCKERBUILDOPT'"
msg_debug "[$(basename $0):$LINENO] codedir: '$codedir'"
+msg_debug "[$(basename $0):$LINENO] pymanagerdir: '$pymanagerdir'"
msg_debug "[$(basename $0):$LINENO] OPTION: '$OPTION'"
msg_info "[$(basename $0):$LINENO] check khanat-opennel-code"
@@ -286,7 +303,8 @@ then
--hostname=builder \
-u "$(id -u $USERNAME):$(id -g $USERNAME)" \
-v $rootdir/builder:/opt/ref/builder:ro \
- -v $codedir:/opt/ref/opennel-code:ro \
+ -v $codedir:/opt/ref/opennel-code:rw \
+ -v $pymanagerdir:/opt/ref/opennel-pymanager:rw \
-v $rootdir/build:/opt/build \
-v /etc/localtime:/etc/localtime:ro \
${DOCKEROPTS} \
@@ -297,11 +315,12 @@ then
-u "$(id -u $USERNAME):$(id -g $USERNAME)" \
-v $rootdir/builder:/opt/ref/builder:ro \
-v $codedir:/opt/ref/opennel-code:rw \
+ -v $pymanagerdir:/opt/ref/opennel-pymanager:ro \
-v $rootdir/build:/opt/build \
-v /etc/localtime:/etc/localtime:ro \
${DOCKEROPTS} \
${IMAGEDOCKER} \
- /opt/ref/builder/${LOCALSRC}/build-under-docker.sh --add-opts-make="$MAKEOPTS" --add-opts-cmake="$CMAKEOPTS" --build-dir="/opt/${LOCALBUILDDIR}" --code-dir="/opt/ref/opennel-code" $OPTION || exit 2
+ /opt/ref/builder/${LOCALSRC}/build-under-docker.sh --add-opts-make="$MAKEOPTS" --add-opts-cmake="$CMAKEOPTS" --build-dir="/opt/${LOCALBUILDDIR}" --code-dir="/opt/ref/opennel-code" --opennel-pymanager-dir="/opt/ref/opennel-pymanager" $OPTION || exit 2
fi
if [[ $CLEANDOCKER -ne 0 ]]
diff --git a/server/common/rootweb/index.php b/server/common/rootweb/index.php
index c6f98ae..cc7698c 100644
--- a/server/common/rootweb/index.php
+++ b/server/common/rootweb/index.php
@@ -1,7 +1,7 @@
- DOCKER KHANAT
+ Test Khanat
+
+
+
+
+
+
+ Home
+ OpenNelManager
+ Administration
+ phpmyadmin
+ patch
+
+ KHANAT SERVER DOCKER (TEST ENVIRONMENT - STATES)
+Number command:'.$total.'
';
+ echo "";
+ echo "Command | Start | Stop | State | Log |
";
+ ksort($data);
+ foreach ($data as $key => $value)
+ {
+ if ( $value == 'started' ) {
+ $fond = "bgcolor=\"SpringGreen \"";
+ } else {
+ $fond = "bgcolor=\"Tomato\"";
+ }
+ list($type, $command) = explode(':', $key, 2);
+ echo "$command | | | $value | log |
";
+ }
+ echo "
";
+ } else {
+ echo "OpenNelManager not used";
+ }
+
+} else {
+ echo "OpenNelManager not actiavted";
+}
+
+?>
+
+
+ Command line :
+
+ curl -XGET
+
+
+
+ Refresh : 10s
+
+
diff --git a/server/common/rootweb/opennelmanager_log.php b/server/common/rootweb/opennelmanager_log.php
new file mode 100644
index 0000000..8299335
--- /dev/null
+++ b/server/common/rootweb/opennelmanager_log.php
@@ -0,0 +1,226 @@
+
+
+
+ Test Khanat Log
+
+
+
+
+
+
+
+
+
+ Home
+ OpenNelManager";
+} else {
+ echo "opennelmanager not used";
+}
+?>
+ Administration
+ phpmyadmin
+ patch
+
+ KHANAT SERVER DOCKER (TEST ENVIRONMENT - LOG)
+
+
+First line:${data['first-line']} Last line:${data['last-line']}
";
+ echo "";
+ echo "Pos | Date | Time | Zone | Type | Address | Program Line | Message |
";
+ ksort($data);
+ foreach ($data as $key => $value)
+ {
+// 2018/08/03 10:45:36 CEST INF 442b0740 command.cpp 149
+ list($date, $hour, $timezone, $typesrc, $addr, $program, $line, $msg) = explode(' ', $value, 8);
+
+ if ( $key == "first-line" or $key == "last-line" )
+ continue;
+
+ $type = substr( $typesrc, strlen($typesrc) - 3 );
+ if ( $type == 'INF' ) {
+ $fond = "bgcolor=\"SpringGreen \"";
+ } else if ( $type == 'DBG') {
+ $fond = "bgcolor=\"AQUAMARINE\"";
+ } else if ( $type == 'WRN') {
+ $fond = "bgcolor=\"Yellow\"";
+ } else if ( $type == 'ERR') {
+ $fond = "bgcolor=\"Tomato\"";
+ } else if ( $type == 'STT') {
+ $fond = "bgcolor=\"Yellow\"";
+ } else if ( $type == 'AST') {
+ $fond = "bgcolor=\"Yellow\"";
+ } else if ( $type == 'UKN') {
+ $fond = "bgcolor=\"Tomato\"";
+ } else {
+ $msg = "$typesrc $addr $program $line $msg";
+ $type = "?";
+ $addr = "";
+ $program = "";
+ $line = "";
+ $fond = "bgcolor=\"Tomato\"";
+ }
+ if ( $program != "" && $line != "" )
+ {
+ if ( substr( $program, strlen($program) - 4 ) != ".cpp" and substr( $program, strlen($program) - 2 ) != ".h" )
+ {
+ $msg = "$program $line $msg";
+ $program = "";
+ $line = "";
+ }
+ }
+ echo "$key | $date | $hour | $timezone | $type | $addr | $program $line | $msg |
";
+
+ }
+ echo "
";
+
+} else {
+ echo "OpenNelManager not enabled";
+}
+?>
+
+ Send to STDIN:
+
+
+
+
+ Command line :
+
+ curl -XGET --header "content-type: application/json" -d ''
+
+
+
+
+
diff --git a/server/debian/common/khaganat.cfg b/server/debian/common/khaganat.cfg
index ebbc1a3..9d0d8fa 100644
--- a/server/debian/common/khaganat.cfg
+++ b/server/debian/common/khaganat.cfg
@@ -21,22 +21,24 @@
# Global parameter
##############################
##############################
-[config]
+[config:server]
# Define port listen (default 8000)
port = 8000
-# key
-keyfile = /home/gameserver/ca/appli/private/serverkey.pem
-
-# certificate
-certfile = /home/gameserver/ca/appli/certs/servercert.pem
-
-# certification to check signature
-ca_cert = /home/gameserver/ca/appli/certs/cachaincert.pem
+# Method http or https
+method = http
# address listen (default all port)
address =
+[config:client]
+# you can use curl as client
+# like: curl -XGET http://127.0.0.1:8000/STATUSALL
+# curl -XPOST http://127.0.0.1:8000/STARTALL
+port = 8000
+method = http
+address = 127.0.0.1
+
##############################
##############################
# List all program we manage #
@@ -46,7 +48,7 @@ address =
##############################
# Admin Executor Service
##############################
-[aes]
+[command:aes]
# command to launch the program
command = ryzom_admin_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/log/khanat --nobreak --fulladminname=admin_executor_service --shortadminname=AES
# Path : where this program is launched
@@ -59,7 +61,7 @@ bufsize = 100
##############################
# bms_master : backup_service
##############################
-[bms_master]
+[command:bms_master]
# command to launch the program
command = ryzom_backup_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid -P49990
# Path : where this program is launched
@@ -67,7 +69,7 @@ path = /home/gameserver/khanat/server/
# size buffer log for each program launched (number line stdout)
logsize = 1000
-#[bms_pd_master]
+#[command:bms_pd_master]
# # command to launch the program
# command = ryzom_backup_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid -P49992
# # Path : where this program is launched
@@ -78,7 +80,7 @@ logsize = 1000
##############################
# egs : entities_game_service
##############################
-[egs]
+[command:egs]
# command to launch the program
command = ryzom_entities_game_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -89,7 +91,7 @@ logsize = 1000
##############################
# gpms : gpm_service
##############################
-[gpms]
+[command:gpms]
# command to launch the program
command = ryzom_gpm_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -100,7 +102,7 @@ logsize = 1000
##############################
# ios : input_output_service
##############################
-[ios]
+[command:ios]
# command to launch the program
command = ryzom_ios_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -111,7 +113,7 @@ logsize = 1000
##############################
# rns : naming_service
##############################
-[rns]
+[command:rns]
# command to launch the program
command = ryzom_naming_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -122,7 +124,7 @@ logsize = 1000
##############################
# rws : welcome_service
##############################
-[rws]
+[command:rws]
# command to launch the program
command = ryzom_welcome_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -133,7 +135,7 @@ logsize = 1000
##############################
# ts : tick_service
##############################
-[ts]
+[command:ts]
# command to launch the program
command = ryzom_tick_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -144,7 +146,7 @@ logsize = 1000
##############################
# ms : mirror_service
##############################
-[ms]
+[command:ms]
# command to launch the program
command = ryzom_mirror_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -155,7 +157,7 @@ logsize = 1000
##############################
# ais_newbyland : ai_service
##############################
-[ais_newbyland]
+[command:ais_newbyland]
# command to launch the program
command = ryzom_ai_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid -mCommon:Newbieland:Post
# Path : where this program is launched
@@ -166,7 +168,7 @@ logsize = 1000
##############################
# mfs : mail_forum_service
##############################
-[mfs]
+[command:mfs]
# command to launch the program
command = ryzom_mail_forum_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -177,7 +179,7 @@ logsize = 1000
##############################
# su : shard_unifier_service
##############################
-[su]
+[command:su]
# command to launch the program
command = ryzom_shard_unifier_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -188,7 +190,7 @@ logsize = 1000
##############################
# fes : frontend_service
##############################
-[fes]
+[command:fes]
# command to launch the program
command = ryzom_frontend_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -199,7 +201,7 @@ logsize = 1000
##############################
# sbs : session_browser_server
##############################
-[sbs]
+[command:sbs]
# command to launch the program
command = ryzom_session_browser_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -210,7 +212,7 @@ logsize = 1000
##############################
# lgs : logger_service
##############################
-[lgs]
+[command:lgs]
# command to launch the program
command = ryzom_logger_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
@@ -218,7 +220,7 @@ path = /home/gameserver/khanat/server/
# size buffer log for each program launched (number line stdout)
logsize = 1000
-# [mos]
+# [command:mos]
# # command to launch the program
# command = ryzom_monitor_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# # Path : where this program is launched
@@ -226,7 +228,7 @@ logsize = 1000
# # size buffer log for each program launched (number line stdout)
# logsize = 1000
-# [pdss]
+# [command:pdss]
# # command to launch the program
# command = ryzom_pd_support_service -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# # Path : where this program is launched
@@ -237,7 +239,7 @@ logsize = 1000
##############################
# ras : admin_service
##############################
-[ras]
+[command:ras]
# command to launch the program
command = ryzom_admin_service --fulladminname=admin_service --shortadminname=AS -A/home/gameserver/khanat/server -C/home/gameserver/khanat/server -L/home/gameserver/khanat/server/log --nobreak --writepid
# Path : where this program is launched
diff --git a/server/debian/common/servercontainer_configure_launcher.sh b/server/debian/common/servercontainer_configure_launcher.sh
index 299fdc9..4739a23 100755
--- a/server/debian/common/servercontainer_configure_launcher.sh
+++ b/server/debian/common/servercontainer_configure_launcher.sh
@@ -72,6 +72,25 @@ fi
source /home/gameserver/.bashrc
+####################################
+# opennel-pymanager
+####################################
+msg_info "[$(basename $0):$LINENO] install/update opennel-pymanager"
+last_pymanager_package=$(ls /opt/ref/pymanager/pymanager*.whl | head -n 1)
+if [[ -n "$last_pymanager_package" ]]
+then
+ pip3 show pymanager
+ if [[ $? -eq 0 ]]
+ then
+ msg_info "[$(basename $0):$LINENO] uninstall opennel-pymanager"
+ pip3 uninstall -y pymanager
+ fi
+ msg_info "[$(basename $0):$LINENO] install opennel-pymanager"
+ pip3 install $last_pymanager_package
+else
+ msg_info "[$(basename $0):$LINENO] no package opennel-pymanager"
+fi
+
####################################
# End
####################################
diff --git a/server/debian/common/servercontainer_init_configure_envi.sh b/server/debian/common/servercontainer_init_configure_envi.sh
index 9e3452e..df605ec 100755
--- a/server/debian/common/servercontainer_init_configure_envi.sh
+++ b/server/debian/common/servercontainer_init_configure_envi.sh
@@ -271,7 +271,7 @@ SSH : ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no gameserver
Use 'sudo bash' to connect on root (ssh/terminal)
---------------------------------------------------
-log khanat server : /home/gameserver/khanat/server/log/log.log
+log khanat server : /home/gameserver/khanat/server/log/log.log
***************************************************
ENDOFCOMMENT
EOF
diff --git a/server/debian/common/servercontainer_launch_auto.sh b/server/debian/common/servercontainer_launch_auto.sh
index 49eb2c0..28de90f 100755
--- a/server/debian/common/servercontainer_launch_auto.sh
+++ b/server/debian/common/servercontainer_launch_auto.sh
@@ -190,6 +190,10 @@ do
METHOD_START=5
shift
;;
+ --start-with-manager)
+ METHOD_START=6
+ shift
+ ;;
*)
msg_error "options '$1' not recognize"
usage
@@ -282,34 +286,49 @@ WHERE domain_id = 12;" || exit 2
# Start khanat
#####################
msg_debug "Start khanat"
+rm /home/gameserver/opennelmanager.flag || echo ""
if [[ $METHOD_START -eq 0 ]]
then
+ msg_debug "start with screen"
source /home/gameserver/.bashrc; export RYZOM_PATH=$KHANAT_PATH; cd "$RYZOM_PATH"; $KHANAT_HOME/khanat/tools/scripts/linux/shard start
elif [[ $METHOD_START -eq 1 ]]
then
+ msg_debug "start with show-khanat-log"
/opt/ext/servercontainer_launch_service.sh
sleep 10
tail -n+0 -f /home/gameserver/log/khanat/log.log
elif [[ $METHOD_START -eq 2 ]]
then
+ msg_debug "start with show-status-nagios"
/opt/ext/servercontainer_launch_service.sh
sleep 10
watch cat /home/gameserver/khanat/server/aes_nagios_report.txt
elif [[ $METHOD_START -eq 3 ]]
then
+ msg_debug "start with show-all-log"
/opt/ext/servercontainer_launch_service.sh
sleep 10
tail -n+0 -f /home/gameserver/log/apache2/* /home/gameserver/log/mysql/* /home/gameserver/log/khanat/*
elif [[ $METHOD_START -eq 4 ]]
then
+ msg_debug "start with "
/opt/ext/servercontainer_launch_service.sh
sleep 10
watch /opt/ext/servercontainer_launch_status.sh --no-color
elif [[ $METHOD_START -eq 5 ]]
then
+ msg_debug "start with show-status"
/opt/ext/servercontainer_launch_service.sh
#sleep 10
bash
+elif [[ $METHOD_START -eq 6 ]]
+then
+ msg_debug "start with OpenNelManager"
+ touch /home/gameserver/opennelmanager.flag
+ python3 -m pymanager.manager -c /home/gameserver/khanat/khaganat.cfg --log DEBUG --filelog /home/gameserver/log/khanat/OpenNelManager.log --launch-program &
+ #sleep 10
+ #screen -t terminal /bin/bash -l
+ /bin/bash -l
else
msg_error 'Bad option'
exit 2
diff --git a/server/debian/common/servercontainer_update_auto.sh b/server/debian/common/servercontainer_update_auto.sh
index cce83fc..48b9a82 100755
--- a/server/debian/common/servercontainer_update_auto.sh
+++ b/server/debian/common/servercontainer_update_auto.sh
@@ -58,6 +58,7 @@ done
#/opt/ext/servercontainer_configure_world.sh || exit 2
su -c "/opt/ext/servercontainer_configure_khanat.sh $OPTION" gameserver || msg_critical "[$(basename $0):$LINENO] Issue when configure khanat"
su -c "/opt/ext/servercontainer_configure_patch.sh $OPTION" gameserver || msg_critical "[$(basename $0):$LINENO] Issue when configure patch"
+su -c '/opt/ext/servercontainer_configure_launcher.sh' gameserver || exit 2
msg_info "[$(basename $0):$LINENO] => END"
exit 0
diff --git a/server/debian/stretch/x86_64/server-container.sh b/server/debian/stretch/x86_64/server-container.sh
index 85bbbe9..509d803 100755
--- a/server/debian/stretch/x86_64/server-container.sh
+++ b/server/debian/stretch/x86_64/server-container.sh
@@ -39,6 +39,7 @@ declare DOCKERBUILDOPT=""
declare DOCKERRUNOPT=""
declare CONFIGUREAUTO=""
declare UPDATEAUTO=""
+declare -i CLEARTERMINAL=1
declare IMAGEGENERICSERVER="opennel/server_generic_debian_stretch_x86_64"
declare IMAGEKHANATSERVER="opennel/servercontainer_debian_stretch_x86_64"
@@ -49,6 +50,7 @@ declare DIRLOG="$ROOTDATAKHANAT/log"
declare DIRDATABASE="$ROOTDATAKHANAT/database"
declare ENVIFILE="$DIROUTPUT/khanat_config.sh"
declare DIRKHANAT="$ROOTDATAKHANAT/khanat"
+declare DIRLOCAL="$ROOTDATAKHANAT/.local"
declare KHANAT_RESSOURCES_DIR=""
declare KHANAT_CLIENT_DATA_DIR=""
declare OPENNEL_CODE_DIR=""
@@ -188,30 +190,37 @@ do
;;
--start-khanat-with-screen)
METHODSTARTSERVER="--start-khanat-with-screen"
+ CLEARTERMINAL=1
shift
;;
--start-khanat-with-khanat-log)
METHODSTARTSERVER="--show-khanat-log"
+ CLEARTERMINAL=1
shift
;;
--start-khanat-with-full-log)
METHODSTARTSERVER="--show-all-log"
+ CLEARTERMINAL=1
shift
;;
--start-khanat-with-watch-state)
METHODSTARTSERVER="--show-status"
+ CLEARTERMINAL=1
shift
;;
--start-khanat-with-watch-state-nagios)
METHODSTARTSERVER="--show-status-nagios"
+ CLEARTERMINAL=1
shift
;;
--start-khanat-with-bash-after)
METHODSTARTSERVER="--bash-after-start"
+ CLEARTERMINAL=1
shift
;;
--start-with-manager)
METHODSTARTSERVER="--start-with-manager"
+ CLEARTERMINAL=0
shift
;;
--client-version*)
@@ -481,6 +490,7 @@ then
msg_info "[$(basename $0):$LINENO] CONFIGURE KHANAT SERVER"
mkdir -p $DIRLOG || exit 2
mkdir -p $DIRDATABASE || exit 2
+ mkdir -p ${DIRLOCAL} || exit 2
msg_debug "[$(basename $0):$LINENO] command : cd $rootdir; docker run -it --hostname=khanat \
-v /etc/localtime:/etc/localtime:ro \
-v ${rootdir}/${LOCALBUILDDIR}/bin:/usr/local/bin:ro \
@@ -492,6 +502,8 @@ then
-v ${rootdir}/$DIRDATABASE:/home/gameserver/database:rw \
-v ${rootdir}/$DIRKHANAT:/home/gameserver/khanat:rw \
-v ${rootdir}/server/debian/common/:/opt/ext:ro \
+ -v ${rootdir}/${LOCALBUILDDIR}:/opt/ref/pymanager:ro \
+ -v ${rootdir}/${DIRLOCAL}:/home/gameserver/.local:rw \
${IMAGEKHANATSERVER} /opt/ext/servercontainer_configure_auto.sh"
cd $rootdir; docker run -it --hostname=khanat \
-v /etc/localtime:/etc/localtime:ro \
@@ -504,12 +516,17 @@ then
-v ${rootdir}/$DIRDATABASE:/home/gameserver/database:rw \
-v ${rootdir}/$DIRKHANAT:/home/gameserver/khanat:rw \
-v ${rootdir}/server/debian/common/:/opt/ext:ro \
+ -v ${rootdir}/${LOCALBUILDDIR}:/opt/ref/pymanager:ro \
+ -v ${rootdir}/${DIRLOCAL}:/home/gameserver/.local:rw \
${IMAGEKHANATSERVER} /opt/ext/servercontainer_configure_auto.sh $CONFIGUREAUTO || exit 2
fi
if [[ $UPDATEDATA -ne 0 ]]
then
msg_info "[$(basename $0):$LINENO] UPDATE KHANAT SERVER"
+ mkdir -p $DIRLOG || exit 2
+ mkdir -p $DIRDATABASE || exit 2
+ mkdir -p ${DIRLOCAL} || exit 2
msg_debug "[$(basename $0):$LINENO] command: cd $rootdir; docker run -it --hostname=khanat \
-v /etc/localtime:/etc/localtime:ro \
-v ${rootdir}/${LOCALBUILDDIR}/bin:/usr/local/bin:ro \
@@ -521,6 +538,8 @@ then
-v ${rootdir}/$DIRDATABASE:/home/gameserver/database:rw \
-v ${rootdir}/$DIRKHANAT:/home/gameserver/khanat:rw \
-v ${rootdir}/server/debian/common/:/opt/ext:ro \
+ -v ${rootdir}/${LOCALBUILDDIR}:/opt/ref/pymanager:ro \
+ -v ${rootdir}/${DIRLOCAL}:/home/gameserver/.local:rw \
${IMAGEKHANATSERVER} /opt/ext/servercontainer_update_auto.sh $UPDATEAUTO"
cd $rootdir; docker run -it --hostname=khanat \
-v /etc/localtime:/etc/localtime:ro \
@@ -533,6 +552,8 @@ then
-v ${rootdir}/$DIRDATABASE:/home/gameserver/database:rw \
-v ${rootdir}/$DIRKHANAT:/home/gameserver/khanat:rw \
-v ${rootdir}/server/debian/common/:/opt/ext:ro \
+ -v ${rootdir}/${LOCALBUILDDIR}:/opt/ref/pymanager:ro \
+ -v ${rootdir}/${DIRLOCAL}:/home/gameserver/.local:rw \
${IMAGEKHANATSERVER} /opt/ext/servercontainer_update_auto.sh $UPDATEAUTO || exit 2
fi
@@ -553,10 +574,15 @@ then
-v ${rootdir}/server/debian/common/:/opt/ext:ro \
-v $rootdir/build:/opt/build:ro \
-v ${OPENNEL_CODE_DIR}:/opt/ref/opennel-code:ro \
+ -v ${rootdir}/${DIRLOCAL}:/home/gameserver/.local:rw \
+ -v ${rootdir}/server/common/rootweb/:/home/gameserver/rootweb:ro \
${IMAGEKHANATSERVER} /opt/ext/servercontainer_launch_auto.sh $METHODSTARTSERVER -d
msg_info "[$(basename $0):$LINENO] CLEAR TERMINAL"
- clear
- tput clear
+ if [[ $CLEARTERMINAL -ne 0 ]]
+ then
+ clear
+ tput clear
+ fi
fi
trap '' EXIT