summaryrefslogtreecommitdiff
path: root/docs/linux-restarter.md
diff options
context:
space:
mode:
authorWalter Pagani <paganiwalter@gmail.com>2021-01-12 16:31:03 -0300
committerGitHub <noreply@github.com>2021-01-12 20:31:03 +0100
commit45f923b6c2d7a0ce2c4edf337b540cb4880c6d68 (patch)
tree4ea540a21269fddd87d79a55e5fad788f642b2f8 /docs/linux-restarter.md
parent4514c12b8a3ec11c1fcdde23ae0c08ddff90eca6 (diff)
downloadwiki-45f923b6c2d7a0ce2c4edf337b540cb4880c6d68.tar.gz
wiki-45f923b6c2d7a0ce2c4edf337b540cb4880c6d68.tar.bz2
wiki-45f923b6c2d7a0ce2c4edf337b540cb4880c6d68.zip
Adding sh syntax in linux-restarter (#356)
Diffstat (limited to 'docs/linux-restarter.md')
-rw-r--r--docs/linux-restarter.md26
1 files changed, 18 insertions, 8 deletions
diff --git a/docs/linux-restarter.md b/docs/linux-restarter.md
index 0d90390..41b7bfa 100644
--- a/docs/linux-restarter.md
+++ b/docs/linux-restarter.md
@@ -3,52 +3,62 @@ This tutorial will walk you through creating a script to restart AzerothCore aft
## Creating The Scripts
#### Prerequisites
-- Verify that your Linux server has screen and nano installed.
-```
+- Verify that your Linux server has screen and nano installed.
+
+```sh
sudo apt-get update && sudo apt-get install screen nano
```
+
- Once you've installed screen and nano, continue on to the next step.
#### Script Creation
- Navigate to your server bin directory `~/azeroth-server/bin` and type `nano auth.sh`
- In the new nano screen, enter the following script:
-```
+
+```sh
#!/bin/sh
while :; do
./authserver
sleep 20
done
```
+
- Once entered, press Ctrl + O, hit Enter, and then Ctrl + X. That will save the new script and return you to the terminal. We've just created the Authserver restart script. Let's next create the Worldserver script.
- Type `nano world.sh`
- In the new nano screen, enter the following script:
-```
+
+```sh
while :; do
./worldserver
sleep 20
done
```
+
- Once entered, press Ctrl + O, hit Enter, and then Ctrl + X. That will save the new script and return you to the terminal. We've just created the Worldserver restart script. Let's next create a script that will launch both the Authserver and Worldserver restarter scripts.
- Type `nano restarter.sh`
-```
+
+```sh
#!/bin/bash
screen -AmdS auth ./auth.sh
screen -AmdS world ./world.sh
```
+
- Once entered, press Ctrl + O, hit Enter, and then Ctrl + X. Finally, let's create our server shutdown script.
- Type `nano shutdown.sh`
-```
+
+```sh
#!/bin/bash
screen -X -S "world" quit
screen -X -S "auth" quit
```
+
- Once entered, press Ctrl + O, hit Enter, and then Ctrl + X. Next, let's start our server.
## Server Management
#### Server Startup
- To start your server with the scripts, ensure you are in you server bin directory `~/azeroth-server/bin`.
-- We will start the restart scripts by typing the following command `./restarter.sh'
-- Side note: If you wish to start the server and see the worldserver console, use the following command `./restarter.sh;screen -r world`
+- We will start the restart scripts by typing the following command `./restarter.sh`
+- Side note: If you wish to start the server and see the worldserver console, use the following command `./restarter.sh; screen -r world`
#### Server Monitoring
- To access and view the Authserver or Worldserver consoles: