update banner, screen to see command
This commit is contained in:
parent
647e9a2f3c
commit
98e0583794
3 changed files with 84 additions and 11 deletions
|
@ -139,12 +139,19 @@ for var in $KHANAT_PATH/server/translation/translated/*_wk.txt; do nomfic=${var#
|
||||||
msg_debug "[$(basename $0):$LINENO] screen configuration"
|
msg_debug "[$(basename $0):$LINENO] screen configuration"
|
||||||
# Copy default 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)"
|
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/\$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/[-]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/[-]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/[-]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/[.][.]\/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
|
# End
|
||||||
####################################
|
####################################
|
||||||
|
|
|
@ -106,6 +106,7 @@ mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'shard'@'localhost' WITH GRANT
|
||||||
####################################
|
####################################
|
||||||
# launch web configuration for khanat
|
# 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"
|
msg_debug "[$(basename $0):$LINENO] launch web configuration for khanat"
|
||||||
httpcode=$(curl -L -w "%{http_code}" 'http://localhost:40916/setup/install.php' \
|
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' \
|
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
|
||||||
|
|
|
@ -171,6 +171,41 @@ alias l='ls \$LS_OPTIONS -lA'
|
||||||
if [ -f /etc/bash_completion ]; then
|
if [ -f /etc/bash_completion ]; then
|
||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
fi
|
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
|
||||||
|
--------
|
||||||
|
<Control>+A+N : next windows
|
||||||
|
<Control>+A+P : previous windows
|
||||||
|
<Control>+A+0 : windows 0 (terminal)
|
||||||
|
<Control>+A+1 : windows 1 (AES)
|
||||||
|
-----------------------------------------
|
||||||
|
To launch server : go to windows AES and ENTER
|
||||||
|
-----------------------------------------
|
||||||
|
ENDOFCOMMENT
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
|
@ -192,12 +227,15 @@ EOF
|
||||||
# Before login
|
# Before login
|
||||||
msg_debug "Configure message login"
|
msg_debug "Configure message login"
|
||||||
cat << EOF > /etc/issue.net
|
cat << EOF > /etc/issue.net
|
||||||
*********************
|
************************
|
||||||
* KHANAT SERVER DEV *
|
* KHANAT SERVER DOCKER *
|
||||||
*********************
|
************************
|
||||||
|
|
||||||
account gameserver
|
+------------+----------+-------------------+
|
||||||
password khanat
|
| Account | Password | Where |
|
||||||
|
+------------+----------+-------------------+
|
||||||
|
| gameserver | khanat | ssh/terminal |
|
||||||
|
+------------+----------+-------------------+
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -205,23 +243,50 @@ EOF
|
||||||
msg_debug "Configure banner"
|
msg_debug "Configure banner"
|
||||||
cat << EOF > /etc/motd
|
cat << EOF > /etc/motd
|
||||||
***************************************************
|
***************************************************
|
||||||
connect to root use gameserver account and launch sudo command
|
EOF
|
||||||
like :
|
|
||||||
|
|
||||||
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 |
|
||||||
|
+--------------------------+
|
||||||
|
|
||||||
---------------------------------------------------
|
Version: \$(cat /home/gameserver/version.txt)
|
||||||
mysql : account root (no password)
|
|
||||||
|
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
|
log khanat server : /home/gameserver/khanat/server/log/log.log
|
||||||
***************************************************
|
***************************************************
|
||||||
|
ENDOFCOMMENT
|
||||||
EOF
|
EOF
|
||||||
|
chown gameserver:gameserver /home/gameserver/.bash_profile
|
||||||
|
|
||||||
# Activate banner
|
# Activate banner
|
||||||
msg_debug "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
|
# Initialize ssh
|
||||||
/etc/init.d/ssh restart
|
/etc/init.d/ssh restart
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue