mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-21 22:46:11 +00:00
[docker server] rename variable RYZOM to KHANAT
This commit is contained in:
parent
94afb6e2fc
commit
fea085ee39
1 changed files with 73 additions and 72 deletions
145
dist/docker/server/debian/common/init-khanat.sh
vendored
145
dist/docker/server/debian/common/init-khanat.sh
vendored
|
@ -9,20 +9,20 @@ cd /opt; tar xzf ryzom-ressources.tar.gz || exit 2
|
|||
|
||||
# configure environment
|
||||
cat << EOF > /opt/shard.sh
|
||||
export RYHOME=/home/gameserver
|
||||
export RYZOM_PATH=/home/gameserver/khanat
|
||||
export PATH=\$PATH:/usr/local/bin:\$RYZOM_PATH/tools/scripts/linux
|
||||
export RYDATA=/home/gameserver/khanat-ressources
|
||||
export KHANAT_HOME=/home/gameserver
|
||||
export KHANAT_PATH=/home/gameserver/khanat
|
||||
export PATH=\$PATH:/usr/local/bin:\$KHANAT_PATH/tools/scripts/linux
|
||||
export KHANAT_DATA=/home/gameserver/khanat-ressources
|
||||
export PATCH_HOME=/home/gameserver
|
||||
export PATCH_CLIENT_SYSTEM=\$PATCH_HOME/patch_service
|
||||
EOF
|
||||
|
||||
# configure environment
|
||||
cat << EOF > /home/gameserver/.bashrc
|
||||
export RYHOME=/home/gameserver
|
||||
export RYZOM_PATH=/home/gameserver/khanat
|
||||
export PATH=\$PATH:/usr/local/bin:\$RYZOM_PATH/tools/scripts/linux
|
||||
export RYDATA=/home/gameserver/khanat-ressources
|
||||
export KHANAT_HOME=/home/gameserver
|
||||
export KHANAT_PATH=/home/gameserver/khanat
|
||||
export PATH=\$PATH:/usr/local/bin:\$KHANAT_PATH/tools/scripts/linux
|
||||
export KHANAT_DATA=/home/gameserver/khanat-ressources
|
||||
export PATCH_HOME=/home/gameserver
|
||||
export PATCH_CLIENT_SYSTEM=\$PATCH_HOME/patch_service
|
||||
EOF
|
||||
|
@ -37,34 +37,34 @@ then
|
|||
echo "KHANAT_CLIENT_VERSION:$KHANAT_CLIENT_VERSION"
|
||||
fi
|
||||
|
||||
mkdir -p $RYHOME $RYZOM_PATH $PATH || exit 2
|
||||
mkdir -p $KHANAT_HOME $KHANAT_PATH $PATH || exit 2
|
||||
|
||||
mkdir -p $RYDATA/ressources
|
||||
(cd $RYDATA; tar xzf /opt/khanat-ressources.tar.gz) || exit 2
|
||||
#cp -r /opt/ressources $RYDATA || exit 2
|
||||
mkdir -p $KHANAT_DATA/ressources
|
||||
(cd $KHANAT_DATA; tar xzf /opt/khanat-ressources.tar.gz) || exit 2
|
||||
#cp -r /opt/ressources $KHANAT_DATA || exit 2
|
||||
|
||||
mkdir -p $RYZOM_PATH/tools/scripts/linux
|
||||
cp -r /opt/code/ryzom/tools/scripts/linux/* $RYZOM_PATH/tools/scripts/linux || exit 2
|
||||
mkdir -p $KHANAT_PATH/tools/scripts/linux
|
||||
cp -r /opt/code/ryzom/tools/scripts/linux/* $KHANAT_PATH/tools/scripts/linux || exit 2
|
||||
|
||||
# configure ryzom
|
||||
mkdir -p $RYZOM_PATH/server || exit 2
|
||||
cp -r /opt/code/ryzom/common/ $RYZOM_PATH/common || exit 2
|
||||
cp -r /opt/code/ryzom/client/ $RYZOM_PATH/client || exit 2
|
||||
cp /opt/code/ryzom/server/*.cfg $RYZOM_PATH/server/. || exit 2
|
||||
sed -i -r 's/(FSListenHost)(.*)(=)(.*)(;)/FSListenHost = "localhost";/g' $RYZOM_PATH/server/frontend_service.cfg || exit 2
|
||||
sed -i -r 's/(DBHost)(.*)(=)(.*)(;)/DBHost = "localhost";/g' $RYZOM_PATH/server/sql.cfg || exit 2
|
||||
sed -i -r 's/(DBRingName)(.*)(=)(.*)(;)/ DBRingName = "ring_mini01";/g' $RYZOM_PATH/server/sql.cfg || exit 2
|
||||
mkdir -p $KHANAT_PATH/server || exit 2
|
||||
cp -r /opt/code/ryzom/common/ $KHANAT_PATH/common || exit 2
|
||||
cp -r /opt/code/ryzom/client/ $KHANAT_PATH/client || exit 2
|
||||
cp /opt/code/ryzom/server/*.cfg $KHANAT_PATH/server/. || exit 2
|
||||
sed -i -r 's/(FSListenHost)(.*)(=)(.*)(;)/FSListenHost = "localhost";/g' $KHANAT_PATH/server/frontend_service.cfg || exit 2
|
||||
sed -i -r 's/(DBHost)(.*)(=)(.*)(;)/DBHost = "localhost";/g' $KHANAT_PATH/server/sql.cfg || exit 2
|
||||
sed -i -r 's/(DBRingName)(.*)(=)(.*)(;)/ DBRingName = "ring_mini01";/g' $KHANAT_PATH/server/sql.cfg || exit 2
|
||||
|
||||
# install web ryzom
|
||||
cp -r /opt/code/web $RYZOM_PATH/khanatweb || exit 2
|
||||
cp -r /opt/code/web $KHANAT_PATH/khanatweb || exit 2
|
||||
|
||||
chmod -R a+w $RYZOM_PATH/khanatweb || exit 2
|
||||
chown -R www-data:www-data $RYZOM_PATH/khanatweb || exit 2
|
||||
chmod -R a+w $KHANAT_PATH/khanatweb || exit 2
|
||||
chown -R www-data:www-data $KHANAT_PATH/khanatweb || exit 2
|
||||
|
||||
# configure apache
|
||||
cat << EOF > /etc/apache2/sites-available/000-default.conf
|
||||
<VirtualHost *:80>
|
||||
<Directory "$RYZOM_PATH/khanatweb/">
|
||||
<Directory "$KHANAT_PATH/khanatweb/">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
@ -76,14 +76,14 @@ cat << EOF > /etc/apache2/sites-available/000-default.conf
|
|||
ServerName lirria.khaganat.net
|
||||
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot $RYZOM_PATH/khanatweb/public_php/
|
||||
DocumentRoot $KHANAT_PATH/khanatweb/public_php/
|
||||
|
||||
ErrorLog \${APACHE_LOG_DIR}/error.log
|
||||
CustomLog \${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:40916>
|
||||
<Directory "$RYZOM_PATH/khanatweb/">
|
||||
<Directory "$KHANAT_PATH/khanatweb/">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
@ -91,7 +91,7 @@ cat << EOF > /etc/apache2/sites-available/000-default.conf
|
|||
ServerName lirria.khaganat.net
|
||||
|
||||
ServerAdmin admin@localhost
|
||||
DocumentRoot $RYZOM_PATH/khanatweb/public_php
|
||||
DocumentRoot $KHANAT_PATH/khanatweb/public_php
|
||||
|
||||
ErrorLog \${APACHE_LOG_DIR}/error.log
|
||||
CustomLog \${APACHE_LOG_DIR}/access.log combined
|
||||
|
@ -225,36 +225,36 @@ UPDATE nel.permission SET AccessPrivilege = 'OPEN,DEV,RESTRICTED';
|
|||
|
||||
# create link resource
|
||||
# Les dossiers :
|
||||
ln -s $RYDATA/collisions $RYZOM_PATH/server/
|
||||
ln -s $RYDATA/leveldesign $RYZOM_PATH/server/
|
||||
ln -s $RYDATA/primitives $RYZOM_PATH/server/
|
||||
ln -s $RYDATA/translation $RYZOM_PATH/server/
|
||||
ln -s $RYDATA/continents $RYZOM_PATH/server/
|
||||
ln -s $RYDATA/common $RYZOM_PATH/server/
|
||||
ln -s $KHANAT_DATA/collisions $KHANAT_PATH/server/
|
||||
ln -s $KHANAT_DATA/leveldesign $KHANAT_PATH/server/
|
||||
ln -s $KHANAT_DATA/primitives $KHANAT_PATH/server/
|
||||
ln -s $KHANAT_DATA/translation $KHANAT_PATH/server/
|
||||
ln -s $KHANAT_DATA/continents $KHANAT_PATH/server/
|
||||
ln -s $KHANAT_DATA/common $KHANAT_PATH/server/
|
||||
|
||||
# Les fichiers :
|
||||
mkdir -p $RYZOM_PATH/server/data_shard
|
||||
cp -r /opt/code/ryzom/server/data_shard/* $RYZOM_PATH/server/data_shard/.
|
||||
ln -s $RYDATA/shard/su/dev_gm_names.xml $RYZOM_PATH/server/data_shard/dev_gm_names.xml
|
||||
ln -s $RYDATA/shard/su/invalid_entity_names.txt $RYZOM_PATH/server/data_shard/invalid_entity_names.txt
|
||||
ln -s $RYDATA/shard/su/reserved_names.xml $RYZOM_PATH/server/data_shard/reserved_names.xml
|
||||
ln -s $RYDATA/shard/egs/game_event.txt $RYZOM_PATH/server/data_shard/game_event.txt
|
||||
ln -s $RYDATA/shard/egs/mission_queues.txt $RYZOM_PATH/server/data_shard/mission_queues.txt
|
||||
ln -s $RYDATA/shard/egs/named_items.txt $RYZOM_PATH/server/data_shard/named_items.txt
|
||||
mkdir -p $KHANAT_PATH/server/data_shard
|
||||
cp -r /opt/code/ryzom/server/data_shard/* $KHANAT_PATH/server/data_shard/.
|
||||
ln -s $KHANAT_DATA/shard/su/dev_gm_names.xml $KHANAT_PATH/server/data_shard/dev_gm_names.xml
|
||||
ln -s $KHANAT_DATA/shard/su/invalid_entity_names.txt $KHANAT_PATH/server/data_shard/invalid_entity_names.txt
|
||||
ln -s $KHANAT_DATA/shard/su/reserved_names.xml $KHANAT_PATH/server/data_shard/reserved_names.xml
|
||||
ln -s $KHANAT_DATA/shard/egs/game_event.txt $KHANAT_PATH/server/data_shard/game_event.txt
|
||||
ln -s $KHANAT_DATA/shard/egs/mission_queues.txt $KHANAT_PATH/server/data_shard/mission_queues.txt
|
||||
ln -s $KHANAT_DATA/shard/egs/named_items.txt $KHANAT_PATH/server/data_shard/named_items.txt
|
||||
|
||||
mkdir -p $RYDATA/mirror_sheets
|
||||
cp -r /opt/code/ryzom/server/data_shard/mirror_sheets/* $RYDATA/mirror_sheets
|
||||
mkdir -p $KHANAT_DATA/mirror_sheets
|
||||
cp -r /opt/code/ryzom/server/data_shard/mirror_sheets/* $KHANAT_DATA/mirror_sheets
|
||||
|
||||
|
||||
# -c/usr/local/etc/nel/make_sheet_id.cfg <---- ne marche pas !
|
||||
cd /usr/local; /usr/local/bin/make_sheet_id \
|
||||
-o$RYDATA/leveldesign/game_elem/sheet_id.bin \
|
||||
$RYDATA/leveldesign/game_elem \
|
||||
$RYDATA/leveldesign/game_element \
|
||||
$RYDATA/leveldesign/world \
|
||||
$RYDATA/leveldesign/ecosystems \
|
||||
$RYDATA/sound \
|
||||
$RYDATA/mirror_sheets || exit 2
|
||||
-o$KHANAT_DATA/leveldesign/game_elem/sheet_id.bin \
|
||||
$KHANAT_DATA/leveldesign/game_elem \
|
||||
$KHANAT_DATA/leveldesign/game_element \
|
||||
$KHANAT_DATA/leveldesign/world \
|
||||
$KHANAT_DATA/leveldesign/ecosystems \
|
||||
$KHANAT_DATA/sound \
|
||||
$KHANAT_DATA/mirror_sheets || exit 2
|
||||
|
||||
rm -rf /opt/sheets_packer/*
|
||||
mkdir -p /opt/sheets_packer/common /opt/sheets_packer/khanat-ressources /opt/sheets_packer/client
|
||||
|
@ -278,18 +278,18 @@ DumpVisualSlotsIndex = 1;
|
|||
EOF
|
||||
|
||||
cp -r /opt/code/ryzom/common/* /opt/sheets_packer/common || exit 2
|
||||
cp -r $RYDATA/* /opt/sheets_packer/khanat-ressources || exit 2
|
||||
cp -r $KHANAT_DATA/* /opt/sheets_packer/khanat-ressources || exit 2
|
||||
cp -r /opt/code/ryzom/client/* /opt/sheets_packer/client || exit 2
|
||||
cd /opt/sheets_packer; sheets_packer 1>/opt/sheets_packer/sheets_packer.log 2>/opt/sheets_packer/sheets_packer.err || exit 2
|
||||
cp /opt/sheets_packer/visual_slot.tab $RYZOM_PATH/common/data_common/visual_slot.tab || exit 2
|
||||
cp /opt/sheets_packer/visual_slot.tab $RYZOM_PATH/client/data/visual_slot.tab || exit 2
|
||||
cp /opt/sheets_packer/visual_slot.tab $KHANAT_PATH/common/data_common/visual_slot.tab || exit 2
|
||||
cp /opt/sheets_packer/visual_slot.tab $KHANAT_PATH/client/data/visual_slot.tab || exit 2
|
||||
|
||||
|
||||
for var in $RYDATA/translation/translated/*_en.txt; do nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_de}; done
|
||||
for var in $RYDATA/translation/translated/*_en.txt; do nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_es}; done
|
||||
for var in $RYDATA/translation/translated/*_wk.txt; do nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_wk/_ru}; done
|
||||
for var in $KHANAT_DATA/translation/translated/*_en.txt; do nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_de}; done
|
||||
for var in $KHANAT_DATA/translation/translated/*_en.txt; do nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_en/_es}; done
|
||||
for var in $KHANAT_DATA/translation/translated/*_wk.txt; do nomfic=${var##*/}; ln -s $nomfic ${var%/*}/${nomfic/_wk/_ru}; done
|
||||
|
||||
cp /opt/code/ryzom/server/shard.screen.rc $RYZOM_PATH/server/shard.screen.rc
|
||||
cp /opt/code/ryzom/server/shard.screen.rc $KHANAT_PATH/server/shard.screen.rc
|
||||
ln -s /usr/local /home/gameserver/build
|
||||
|
||||
/etc/init.d/ssh restart
|
||||
|
@ -309,23 +309,24 @@ source /opt/shard.sh
|
|||
|
||||
tmp=\$(hostname -I)
|
||||
export addressip=\${tmp//[[:blank:]]/}
|
||||
sed -i -r 's/(FSListenHost)(.*)(=)(.*)(;)/FSListenHost = "'"\$addressip"'";/g' \$RYZOM_PATH/server/frontend_service.cfg || exit 2
|
||||
sed -i -r 's/(FSListenHost)(.*)(=)(.*)(;)/FSListenHost = "'"\$addressip"'";/g' \$KHANAT_PATH/server/frontend_service.cfg || exit 2
|
||||
|
||||
export RYZOM_PATH=\$KHANAT_PATH
|
||||
/home/gameserver/khanat/tools/scripts/linux/shard start
|
||||
EOF
|
||||
|
||||
chmod +x /opt/autostart.sh
|
||||
|
||||
mkdir -p $RYZOM_PATH/server/save_shard/rrd_graphs
|
||||
mkdir -p $KHANAT_PATH/server/save_shard/rrd_graphs
|
||||
|
||||
|
||||
## See on https://ryzomcore.atlassian.net/wiki/display/RC/Configure+Linux+Web+Services
|
||||
#mkdir -p $RYZOM_PATH/tools/server/admin/graphs_output
|
||||
#mkdir -p $RYZOM_PATH/tools/server/admin/templates/default_c
|
||||
#mkdir -p $RYZOM_PATH/tools/server/www/login/logs
|
||||
#mkdir -p $RYZOM_PATH/tools/server/ryzom_ams/www/
|
||||
#mkdir -p $RYZOM_PATH/tools/server/ryzom_ams/www/html/cache
|
||||
#mkdir -p $RYZOM_PATH/tools/server/ryzom_ams/www/html/templates_c
|
||||
#mkdir -p $KHANAT_PATH/tools/server/admin/graphs_output
|
||||
#mkdir -p $KHANAT_PATH/tools/server/admin/templates/default_c
|
||||
#mkdir -p $KHANAT_PATH/tools/server/www/login/logs
|
||||
#mkdir -p $KHANAT_PATH/tools/server/ryzom_ams/www/
|
||||
#mkdir -p $KHANAT_PATH/tools/server/ryzom_ams/www/html/cache
|
||||
#mkdir -p $KHANAT_PATH/tools/server/ryzom_ams/www/html/templates_c
|
||||
#shard
|
||||
|
||||
#
|
||||
|
@ -339,7 +340,7 @@ echo "PATCH_CLIENT_SYSTEM:$PATCH_CLIENT_SYSTEM"
|
|||
mkdir -p $PATCH_HOME/patch_service/dataserver || exit 2
|
||||
|
||||
# Search le nombre de langue
|
||||
listlang=$(ls $RYDATA/translation/translated | cut -f 1 -d '.' | sed 's/^.*\(.\{2\}\)$/\1/' | sort | uniq)
|
||||
listlang=$(ls $KHANAT_DATA/translation/translated | cut -f 1 -d '.' | sed 's/^.*\(.\{2\}\)$/\1/' | sort | uniq)
|
||||
echo "LIST LANG : $listlang"
|
||||
|
||||
for lang in $listlang
|
||||
|
@ -352,12 +353,12 @@ mkdir -p $PATCH_HOME/patch_service/dataserver || exit 2
|
|||
mkdir -p $PATCH_CLIENT_SYSTEM/patch_game/bnp/
|
||||
|
||||
echo "COPY DATA TO GENERATE PATCH"
|
||||
cp $RYZOM_PATH/common/data_common/database.xml $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp $RYZOM_PATH/common/data_common/msg.xml $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp $KHANAT_PATH/common/data_common/database.xml $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp $KHANAT_PATH/common/data_common/msg.xml $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp /opt/sheets_packer/client/data/*.packed_sheets $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp /opt/sheets_packer/client/data/*.packed $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp $RYZOM_PATH/common/data_common/visual_slot.tab $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp $RYDATA/leveldesign/game_elem/sheet_id.bin $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp $KHANAT_PATH/common/data_common/visual_slot.tab $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
cp $KHANAT_DATA/leveldesign/game_elem/sheet_id.bin $PATCH_CLIENT_SYSTEM/kh_server/ || exit 2
|
||||
|
||||
|
||||
cd $PATCH_HOME/patch_service/dataserver; tar xzf /opt/khanat-data-client.tar.gz || exit 2
|
||||
|
@ -365,7 +366,7 @@ cd $PATCH_HOME/patch_service/dataserver; tar xzf /opt/khanat-data-client.tar.gz
|
|||
# language : copy to client (to generate client patch)
|
||||
for lang in $listlang
|
||||
do
|
||||
cp $RYDATA/translation/translated/*$lang.* $PATCH_CLIENT_SYSTEM/dataserver/kh_translate_$lang/ || exit 2
|
||||
cp $KHANAT_DATA/translation/translated/*$lang.* $PATCH_CLIENT_SYSTEM/dataserver/kh_translate_$lang/ || exit 2
|
||||
done
|
||||
|
||||
echo "GENERATE PATCH"
|
||||
|
|
Loading…
Reference in a new issue