mirror of
https://github.com/hermensbas/azerothcore_installer.git
synced 2026-01-13 00:28:33 +00:00
testing
This commit is contained in:
@@ -8,6 +8,10 @@ echo " ";
|
||||
if [[ $REPLY =~ ^[Yy]$ ]];
|
||||
then
|
||||
|
||||
sudo chmod +x ${ROOT_DIR}/*.sh
|
||||
sudo chmod +x ${ROOT_DIR}/helper/*.sh
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# General dependencies
|
||||
##########################################################################################
|
||||
|
||||
@@ -89,13 +89,13 @@ then
|
||||
echo "## After the first install or changes either reboot or TYPE! 'source ~/.bashrc'"
|
||||
echo "###########################################################################################"
|
||||
echo "## After the above you can use the following commands:"
|
||||
echo "### update - Updates source-code to latest version"
|
||||
echo "### build - Builds the server based on source-code"
|
||||
echo "### compile - Compiles the code based on the build server"
|
||||
echo "### config - Applies the server configration"
|
||||
echo "### start - starts auth and world in tmux sessions server"
|
||||
echo "### stop - starts all servers"
|
||||
echo "### wow - logon world-server tmux session"
|
||||
echo "### auth - logon auth-server tmux session"
|
||||
echo "### update - updates the current downloaded source-code, after rerun: build, compile and config."
|
||||
echo "### build - (re)builds the server based on the downloaded/updated source-codes"
|
||||
echo "### compile - (re)compiles the server based on the build server"
|
||||
echo "### config - applies configuration settings defined in the 'config' folder"
|
||||
echo "### stop - stops all sessions"
|
||||
echo "### wow - logon world-server (tmux) session"
|
||||
echo "### auth - logon auth-server (tmux) session"
|
||||
echo "###########################################################################################"
|
||||
fi
|
||||
|
||||
@@ -4,27 +4,24 @@ source ${ROOT_DIR}/variables.sh
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# Apply realm settings
|
||||
# Apply server realm configuration
|
||||
##########################################################################################
|
||||
sudo mysql -u root --database="acore_auth" -e "UPDATE realmlist SET address = '${REALM_IP}' WHERE id = 1;"
|
||||
sudo mysql -u root --database="acore_auth" -e "UPDATE realmlist SET name = '${REALM_NAME}' WHERE id = 1;"
|
||||
echo "Realm settings updated..."
|
||||
source ${ROOT_DIR}/helper/update_realm_ip.sh ${REALM_IP}
|
||||
source ${ROOT_DIR}/helper/update_realm_ip.sh ${REALM_NAME}
|
||||
echo " "
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# Apply ah-modbot settings
|
||||
# Apply ah-bot custom configuration
|
||||
##########################################################################################
|
||||
sudo mysql -u root --database="acore_world" -e "UPDATE mod_auctionhousebot SET minitems = ${AH_BOT_MIN_ITEMS}, maxitems = ${AH_BOT_MAX_ITEMS};"
|
||||
echo "Module ah-modbot updated..."
|
||||
source ${ROOT_DIR}/helper/update_ahbot_config.sh ${AH_BOT_MIN_ITEMS} ${AH_BOT_MAX_ITEMS}
|
||||
echo " "
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# reset playerbots data (enforces performance and bot levels balance)
|
||||
# Clear playerbots account and characters (enforces performance and bot levels balance)
|
||||
##########################################################################################
|
||||
sudo mysql -u root --database="acore_characters" < ${ROOT_DIR}/lib/clear-bots.sql
|
||||
echo "Module playerbots updated..."
|
||||
source ${ROOT_DIR}/helper/clear_playerbots.sh
|
||||
echo " "
|
||||
|
||||
|
||||
@@ -59,13 +56,16 @@ if tmux send-keys -t $WORLDSERVER_SESSION "$WORLDSERVER" C-m; then
|
||||
else
|
||||
echo "Error when executing \"$WORLDSERVER\" inside $WORLDSERVER_SESSION"
|
||||
fi
|
||||
echo " "
|
||||
|
||||
echo " "
|
||||
echo "###########################################################################################"
|
||||
echo "# type in terminal: "
|
||||
echo "# - 'wow' : for the worlds-server session"
|
||||
echo "# - 'auth' : for the auth-server session"
|
||||
echo "# - 'ctrl+b then d' : detach from session (if not working use ctrl-z)"
|
||||
echo "# - 'stop' : the kill the world and auth -server sessions"
|
||||
echo "# - 'update' :
|
||||
echo "## After the above you can use the following commands:"
|
||||
echo "### update - Updates source-code to latest version"
|
||||
echo "### build - Builds the server based on source-code"
|
||||
echo "### compile - Compiles the code based on the build server"
|
||||
echo "### config - Applies the server configration"
|
||||
echo "### start - starts auth and world in tmux sessions server"
|
||||
echo "### stop - stops all sessions"
|
||||
echo "### wow - logon world-server (tmux) session"
|
||||
echo "### auth - logon auth-server (tmux) session"
|
||||
echo "###########################################################################################"
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
read -p "This will delete all items of the auction house, are you sure? (Y)es/(N)o: " -n 1 -r
|
||||
echo " ";
|
||||
if [[ $REPLY =~ ^[Yy]$ ]];
|
||||
then
|
||||
|
||||
sudo mysql -u root --database="acore_characters" -e "DELETE FROM auctionhouse;"
|
||||
|
||||
fi
|
||||
|
||||
7
helper/clear_auctionhouse.sh
Executable file
7
helper/clear_auctionhouse.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/..
|
||||
source ${ROOT_DIR}/variables.sh
|
||||
|
||||
sudo mysql -u root --database="acore_characters" < ${ROOT_DIR}/sql/clear_auctionhouse.sql
|
||||
|
||||
echo "Auction house items deleted..."
|
||||
7
helper/clear_playerbots.sh
Executable file
7
helper/clear_playerbots.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/..
|
||||
source ${ROOT_DIR}/variables.sh
|
||||
|
||||
sudo mysql -u root --database="acore_characters" < ${ROOT_DIR}/sql/clear_playerbots.sql
|
||||
|
||||
echo "Playerbots accounts and characters deleted..."
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Parameter is null, first paramter 'character name' should not be empty";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
# find character and account id by name, mainly used for configuring the ah-bot mod.
|
||||
sudo mysql -u root --database="acore_auth" -e "select acc.id as accountId, ch.guid as characterId from acore_auth.account as acc inner join acore_characters.characters as ch where acc.id = ch.account and acc.username = '${1}';"
|
||||
16
helper/find_characters.sh
Executable file
16
helper/find_characters.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/..
|
||||
source ${ROOT_DIR}/variables.sh
|
||||
|
||||
ACCOUNT_NAME=$1;
|
||||
if [ -z "$ACCOUNT_NAME" ]
|
||||
then
|
||||
echo "First parameter 'ACCOUNT_NAME' is required";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
sed -e "s/{{ACCOUNT_NAME}}/$ACCOUNT_NAME/g" \
|
||||
"${ROOT_DIR}/sql/find_character.sql" > "/tmp/find_character.sql"
|
||||
sudo mysql -u root --database="acore_characters" < /tmp/find_character.sql
|
||||
|
||||
echo "Find character executed..."
|
||||
5
helper/git-alias.sh
Executable file
5
helper/git-alias.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Alias GIT (git lg for git commits, git ls for commits with changed files)
|
||||
git config --global alias.lg 'log --graph --abbrev-commit --decorate --date=relative --all'
|
||||
git config --global alias.ls 'log --stat --pretty=short --graph'
|
||||
24
helper/update_ahbot_config.sh
Executable file
24
helper/update_ahbot_config.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/..
|
||||
source ${ROOT_DIR}/variables.sh
|
||||
|
||||
AH_BOT_MIN_ITEMS=$1;
|
||||
if [ -z "$AH_BOT_MIN_ITEMS" ]
|
||||
then
|
||||
echo "First parameter 'AH_BOT_MIN_ITEMS' is required";
|
||||
exit 1;
|
||||
fi
|
||||
AH_BOT_MAX_ITEMS=$2
|
||||
if [ -z "$AH_BOT_MAX_ITEMS" ]
|
||||
then
|
||||
echo "Second parameter 'AH_BOT_MAX_ITEMS' is required";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
sed -e "s/{{AH_BOT_MIN_ITEMS}}/$AH_BOT_MIN_ITEMS/g" \
|
||||
-e "s/{{AH_BOT_MAX_ITEMS}}/$AH_BOT_MAX_ITEMS/g" \
|
||||
> "${ROOT_DIR}/sql/update_ahbot_config.sql" > "/tmp/update_ahbot_config.sql"
|
||||
sudo mysql -u root --database="acore_characters" < /tmp/update_ahbot_config.sql
|
||||
|
||||
echo "AH-bot config updated..."
|
||||
17
helper/update_realm_ip.sh
Executable file
17
helper/update_realm_ip.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/..
|
||||
source ${ROOT_DIR}/variables.sh
|
||||
|
||||
REALM_IP=$1;
|
||||
if [ -z "$REALM_IP" ]
|
||||
then
|
||||
echo "First parameter 'REALM_IP' is required";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
sed -e "s/{{REALM_IP}}/$REALM_IP/g" \
|
||||
"${ROOT_DIR}/sql/update_realm_ip.sql" > "/tmp/update_realm_ip.sql"
|
||||
sudo mysql -u root --database="acore_characters" < /tmp/update_realm_ip.sql
|
||||
|
||||
echo "Server realm IP updated..."
|
||||
17
helper/update_realm_name.sh
Executable file
17
helper/update_realm_name.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
ROOT_DIR="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/..
|
||||
source ${ROOT_DIR}/variables.sh
|
||||
|
||||
REALM_NAME=$1;
|
||||
if [ -z "$REALM_NAME" ]
|
||||
then
|
||||
echo "First parameter 'REALM_NAME' is required";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
||||
sed -e "s/{{REALM_NAME}}/$REALM_NAME/g" \
|
||||
"${ROOT_DIR}/sql/update_realm_name.sql" > "/tmp/update_realm_name.sql"
|
||||
sudo mysql -u root --database="acore_characters" < /tmp/update_realm_name.sql
|
||||
|
||||
echo "Server realm name updated..."
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
##########################################################################################
|
||||
# General settings
|
||||
##########################################################################################
|
||||
# Setting execute rights for the scripts
|
||||
sudo chmod +x ${ROOT_DIR}/*.sh
|
||||
sudo chmod +x ${ROOT_DIR}/lib/*.sh
|
||||
sudo chmod +x ${ROOT_DIR}/helper/*.sh
|
||||
|
||||
# Alias GIT (git lg for git commits, git ls for commits with changed files)
|
||||
git config --global alias.lg 'log --graph --abbrev-commit --decorate --date=relative --all'
|
||||
git config --global alias.ls 'log --stat --pretty=short --graph'
|
||||
2
sql/clear_auctionhouse.sql
Executable file
2
sql/clear_auctionhouse.sql
Executable file
@@ -0,0 +1,2 @@
|
||||
USE acore_characters;
|
||||
DELETE FROM auctionhouse;
|
||||
0
lib/clear-bots.sql → sql/clear_playerbots.sql
Normal file → Executable file
0
lib/clear-bots.sql → sql/clear_playerbots.sql
Normal file → Executable file
5
sql/find_character.sql
Executable file
5
sql/find_character.sql
Executable file
@@ -0,0 +1,5 @@
|
||||
USE acore_auth;
|
||||
SELECT acc.id AS accountId, ch.name as characterName, ch.guid AS characterId,
|
||||
FROM acore_auth.account AS acc
|
||||
INNER JOIN acore_characters.characters AS ch
|
||||
WHERE acc.id = ch.account and acc.username = '{{ACCOUNT_NAME}}';
|
||||
2
sql/update_ahbot_config.sql
Normal file → Executable file
2
sql/update_ahbot_config.sql
Normal file → Executable file
@@ -1,3 +1,3 @@
|
||||
USE acore_world;
|
||||
UPDATE mod_auctionhousebot
|
||||
SET minitems = 30000, maxitems = 40000;
|
||||
SET minitems = '{{AH_BOT_MIN_ITEMS}}', maxitems = '{{AH_BOT_MAX_ITEMS}}';
|
||||
|
||||
2
sql/update_realm_ip.sql
Normal file → Executable file
2
sql/update_realm_ip.sql
Normal file → Executable file
@@ -1,3 +1,3 @@
|
||||
USE acore_auth;
|
||||
SELECT * FROM realmlist;
|
||||
UPDATE realmlist SET address='192.168.178.185';
|
||||
UPDATE realmlist SET address='{{REALM_IP}}';
|
||||
|
||||
2
sql/update_realm_name.sql
Normal file → Executable file
2
sql/update_realm_name.sql
Normal file → Executable file
@@ -1,3 +1,3 @@
|
||||
USE acore_auth;
|
||||
SELECT * FROM realmlist;
|
||||
UPDATE realmlist SET name='azerothcore.org';
|
||||
UPDATE realmlist SET name='{{REALM_NAME}}';
|
||||
|
||||
@@ -34,9 +34,3 @@ REALM_NAME="azerothcore.org"
|
||||
|
||||
AH_BOT_MIN_ITEMS=25000
|
||||
AH_BOT_MAX_ITEMS=30000
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# General settings
|
||||
##########################################################################################
|
||||
source ${ROOT_DIR}/lib/general-settings.sh
|
||||
|
||||
Reference in New Issue
Block a user