Compare commits
2 commits
32cff5128d
...
74d0c543f2
Author | SHA1 | Date | |
---|---|---|---|
74d0c543f2 | |||
b4f4188524 |
2 changed files with 16 additions and 4 deletions
|
@ -6,7 +6,10 @@
|
|||
These three `.sh` files were created for Infern009's Factorio server, and use [Byobu](https://www.byobu.org/) to run a Factorio server.
|
||||
|
||||
## Usage
|
||||
- Clone this repository, then cd into the `factorio` directory.
|
||||
|
||||
- Clone this repository, then cd into it.
|
||||
- `git clone https://git.seaswimmer.cc/SeaswimmerTheFsh/Factorio-Scripts.git && cd Factorio-Scripts`
|
||||
- `cd Factorio-Scripts`
|
||||
- Make sure you have **Byobu** installed.
|
||||
- Alpine
|
||||
- `sudo apk add -y byobu`
|
||||
|
@ -18,7 +21,7 @@ These three `.sh` files were created for Infern009's Factorio server, and use [B
|
|||
- `sudo apt-get install -y byobu`
|
||||
- Gentoo
|
||||
- `sudo emerge -y byobu`
|
||||
- MacOS **__(UNSUPPORTED)__**
|
||||
- MacOS **(UNSUPPORTED)**
|
||||
- `sudo brew install byobu`
|
||||
- If none of these commands work for your platform, you can compile **Bybou** with the `install-byobu.sh` script.
|
||||
- Run the `start_server.sh` script.
|
||||
|
@ -33,4 +36,4 @@ These three `.sh` files were created for Infern009's Factorio server, and use [B
|
|||
- `extra_params_start_server=""` - This parameter adds additional flags to the `-server-start` command.
|
||||
- `--server-settings ./data/server-settings.json`
|
||||
- Run the `start_server.sh` script.
|
||||
- To stop the server, either run the `stop_server.sh` script from a terminal or type `/quit` into the Factorio server's console.
|
||||
- To stop the server, either run the `stop_server.sh` script from a terminal or type `/quit` into the Factorio server's console.
|
||||
|
|
|
@ -14,6 +14,15 @@ extra_params_start_server=""
|
|||
script_dir="$(cd "$(dirname "$0")" && pwd)"
|
||||
cd ${script_dir}
|
||||
|
||||
# Check if the current directory is inside a Git repository.
|
||||
if [ -d .git ] || git rev-parse --is-inside-work-tree > /dev/null 2>&1 ; then
|
||||
# Pull updated scripts from CoastalCommits.
|
||||
git pull
|
||||
else
|
||||
# The current directory is not part of a Git repository.
|
||||
echo "WARNING: This directory is not a Git repository. Script updates will not be automatically fetched."
|
||||
fi
|
||||
|
||||
# This handles automatically updating the Factorio binary.
|
||||
wget https://factorio.com/get-download/stable/headless/linux64 -O factorio_headless.tar.xz
|
||||
tar -xf factorio_headless.tar.xz --strip-components=1 --overwrite
|
||||
|
@ -30,4 +39,4 @@ byobu new-session -d -s factorio "./bin/x64/factorio ${extra_params_start_server
|
|||
|
||||
# This attaches the current terminal to the byobu session.
|
||||
# Comment this out if you don't want this functionality.
|
||||
byobu attach -t factorio
|
||||
byobu attach -t factorio
|
||||
|
|
Loading…
Reference in a new issue