diff --git a/server/debian/common/servercontainer_configure_khanat.sh b/server/debian/common/servercontainer_configure_khanat.sh index aab9aab..b6a8db3 100755 --- a/server/debian/common/servercontainer_configure_khanat.sh +++ b/server/debian/common/servercontainer_configure_khanat.sh @@ -139,12 +139,19 @@ for var in $KHANAT_PATH/server/translation/translated/*_wk.txt; do nomfic=${var# msg_debug "[$(basename $0):$LINENO] screen configuration" # Copy default screen configuration cp $KHANAT_HOME/ext/ryzom-ressources/server/shard.screen.rc $KHANAT_PATH/server/shard.screen.rc || msg_critical "copy issue (file:shard.screen.rc)" + sed -i -r 's/\$RYZOM_PATH\/\.\.\/build\/bin\///g' $KHANAT_PATH/server/shard.screen.rc || msg_critical "replace param issue (file:shard.screen.rc, RYZOM_PATH)" + sed -i -r 's/[-]A[.]/ /g' $KHANAT_PATH/server/shard.screen.rc || msg_critical "replace param issue (file:shard.screen.rc, param -A)" + sed -i -r 's/[-]C[.]/ -A\/home\/gameserver\/khanat\/server -C\/home\/gameserver\/khanat\/server /g' $KHANAT_PATH/server/shard.screen.rc || msg_critical "replace param issue (file:shard.screen.rc, param -C)" + sed -i -r 's/[-]L[.]/ -L\/home\/gameserver\/log\/khanat /g' $KHANAT_PATH/server/shard.screen.rc || msg_critical "replace param issue (file:shard.screen.rc, param -L)" + sed -i -r 's/[.][.]\/tools\/scripts\/linux\//\/home\/gameserver\/khanat\/tools\/scripts\/linux\//g' $KHANAT_PATH/server/shard.screen.rc || msg_critical "replace param issue (file:shard.screen.rc, tools/script/linux)" +sed -i -r 's/chdir \$RYZOM_PATH\/server/chdir \$RYZOM_PATH\/server\\\nscreen -t terminal \/bin\/bash -l/g' $KHANAT_PATH/server/shard.screen.rc || msg_critical "replace param issue (file:shard.screen.rc, tools/script/linux)" + #################################### # End #################################### diff --git a/server/debian/common/servercontainer_configure_world.sh b/server/debian/common/servercontainer_configure_world.sh index 58af38b..4908aec 100755 --- a/server/debian/common/servercontainer_configure_world.sh +++ b/server/debian/common/servercontainer_configure_world.sh @@ -106,6 +106,7 @@ mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'shard'@'localhost' WITH GRANT #################################### # launch web configuration for khanat #################################### +## TODO : check if database is installed before launch this command msg_debug "[$(basename $0):$LINENO] launch web configuration for khanat" httpcode=$(curl -L -w "%{http_code}" 'http://localhost:40916/setup/install.php' \ -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \ diff --git a/server/debian/common/servercontainer_init_configure_envi.sh b/server/debian/common/servercontainer_init_configure_envi.sh index a19589e..9e3452e 100755 --- a/server/debian/common/servercontainer_init_configure_envi.sh +++ b/server/debian/common/servercontainer_init_configure_envi.sh @@ -171,6 +171,41 @@ alias l='ls \$LS_OPTIONS -lA' if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi + +cat << ENDOFCOMMENT ++--------------------------+ +| KHANAT SERVER DOCKER | ++--------------------------+ + +Version: \$(cat /home/gameserver/version.txt) + +IP:\$(hostname -i) + +WEB : http://\$(hostname -i)/ +SSH : ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no gameserver@\$(hostname -i) + ++------------+----------+-------------------+ +| Account | Password | Where | ++------------+----------+-------------------+ +| gameserver | khanat | ssh/terminal | +| root | | mysql/phpmyadmin | +| admin | admin | khaganat (admin) | +| tester | tester | khaganat (player) | ++------------+----------+-------------------+ + +Use 'sudo bash' to connect on root (ssh/terminal) + +----------------------------------------- +SCREEN +-------- ++A+N : next windows ++A+P : previous windows ++A+0 : windows 0 (terminal) ++A+1 : windows 1 (AES) +----------------------------------------- +To launch server : go to windows AES and ENTER +----------------------------------------- +ENDOFCOMMENT EOF #################################### @@ -192,12 +227,15 @@ EOF # Before login msg_debug "Configure message login" cat << EOF > /etc/issue.net -********************* -* KHANAT SERVER DEV * -********************* +************************ +* KHANAT SERVER DOCKER * +************************ -account gameserver -password khanat ++------------+----------+-------------------+ +| Account | Password | Where | ++------------+----------+-------------------+ +| gameserver | khanat | ssh/terminal | ++------------+----------+-------------------+ EOF @@ -205,23 +243,50 @@ EOF msg_debug "Configure banner" cat << EOF > /etc/motd *************************************************** -connect to root use gameserver account and launch sudo command -like : +EOF - sudo bash +# After Login and on gameserver (can use bash and other command) +# Bash_profile +cat << EOF > /home/gameserver/.bash_profile +cat << ENDOFCOMMENT ++--------------------------+ +| KHANAT SERVER DOCKER | ++--------------------------+ ---------------------------------------------------- -mysql : account root (no password) +Version: \$(cat /home/gameserver/version.txt) + +IP:\$(hostname -i) + +WEB : http://\$(hostname -i)/ +SSH : ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no gameserver@\$(hostname -i) + ++------------+----------+-------------------+ +| Account | Password | Where | ++------------+----------+-------------------+ +| gameserver | khanat | ssh/terminal | +| root | | mysql/phpmyadmin | +| admin | admin | khaganat (admin) | +| tester | tester | khaganat (player) | ++------------+----------+-------------------+ + +Use 'sudo bash' to connect on root (ssh/terminal) --------------------------------------------------- log khanat server : /home/gameserver/khanat/server/log/log.log *************************************************** +ENDOFCOMMENT EOF +chown gameserver:gameserver /home/gameserver/.bash_profile # Activate banner msg_debug "Activate banner" -sed -i 's/#Banner/Banner/g' /etc/ssh/sshd_config +sed -i 's/^[#]*[[:space:]]*Banner.*$/Banner \/etc\/issue.net/g' /etc/ssh/sshd_config +# Define default version (empty) +touch /home/gameserver/version.txt +chown gameserver:gameserver /home/gameserver/version.txt +chmod uga+wr /home/gameserver/version.txt + # Initialize ssh /etc/init.d/ssh restart