From d04e186015e154f646517f292b386d7e0829df28 Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Sat, 12 Jul 2014 12:21:14 -0700 Subject: [PATCH] Watchdog moved to tools/Watchdog, added example support scripts. --- DLLSocket/compile.sh | 0 {DLLSocket => tools/Watchdog}/README.md | 6 +++--- .../server_controller.py => tools/Watchdog/Watchdog.py | 0 tools/Watchdog/compile_ss13.sh | 5 +++++ tools/Watchdog/ss13.sh | 2 ++ tools/Watchdog/wrapDD.sh | 4 ++++ 6 files changed, 14 insertions(+), 3 deletions(-) mode change 100755 => 100644 DLLSocket/compile.sh rename {DLLSocket => tools/Watchdog}/README.md (83%) rename DLLSocket/server_controller.py => tools/Watchdog/Watchdog.py (100%) create mode 100644 tools/Watchdog/compile_ss13.sh create mode 100644 tools/Watchdog/ss13.sh create mode 100644 tools/Watchdog/wrapDD.sh diff --git a/DLLSocket/compile.sh b/DLLSocket/compile.sh old mode 100755 new mode 100644 diff --git a/DLLSocket/README.md b/tools/Watchdog/README.md similarity index 83% rename from DLLSocket/README.md rename to tools/Watchdog/README.md index 77b6066dbae..03ccbcb5fb6 100644 --- a/DLLSocket/README.md +++ b/tools/Watchdog/README.md @@ -21,16 +21,16 @@ Setting Up 1. Clone your server's code from github or another git repository to the directory you wish to run the server from. 2. Install BYOND. 3. Copy the config (or config-example, for /vg/-based servers) to a separate directory and edit as needed. Moving configs elsewhere keeps them from being overwritten during updates. -4. Edit server_controller.py to taste. +4. Edit Watchdog.py to taste. You will also need to edit the accompanying bash scripts to fit your environment. 5. Create the necessary scripts. -5. Optionally, edit your MOTD with the following macros (replaced when the config is copied over): +6. Optionally, edit your MOTD with the following macros (replaced when the config is copied over): * {GIT_BRANCH}: The desired branch in your git repository. * {GIT_REMOTE}: The name of the remote. * {GIT_COMMIT}: Shortened version of the current commit. Usage ----- -Start server_controller.py with python 2.7. (If you're on linux, your best option would be to run it in a screen session.) +Start Watchdog.py with python 2.7. (If you're on linux, your best option would be to run it in a screen session.) After starting, it will check if the repository requires an update. If it does, it will fetch and pull the update, then compile the project using the script specified. After diff --git a/DLLSocket/server_controller.py b/tools/Watchdog/Watchdog.py similarity index 100% rename from DLLSocket/server_controller.py rename to tools/Watchdog/Watchdog.py diff --git a/tools/Watchdog/compile_ss13.sh b/tools/Watchdog/compile_ss13.sh new file mode 100644 index 00000000000..74568c0c5b7 --- /dev/null +++ b/tools/Watchdog/compile_ss13.sh @@ -0,0 +1,5 @@ +#!/bin/bash +source /home/gmod/byond/bin/byondsetup +cd ~/byond/tgstation +killall -9 DreamDaemon +DreamMaker baystation12 diff --git a/tools/Watchdog/ss13.sh b/tools/Watchdog/ss13.sh new file mode 100644 index 00000000000..198b3915f38 --- /dev/null +++ b/tools/Watchdog/ss13.sh @@ -0,0 +1,2 @@ +killall -9 DreamDaemon +screen -dmS SS13 ~/byond/wrapDD.sh diff --git a/tools/Watchdog/wrapDD.sh b/tools/Watchdog/wrapDD.sh new file mode 100644 index 00000000000..80431274073 --- /dev/null +++ b/tools/Watchdog/wrapDD.sh @@ -0,0 +1,4 @@ +#!/bin/bash +source /home/gmod/byond/bin/byondsetup +cd ~/byond/tgstation +DreamDaemon baystation12 1336 -trusted -threads off