Created
January 30, 2019 07:38
-
-
Save click0/a5cce5eb492acf26bb72a37eae800dba to your computer and use it in GitHub Desktop.
# Install Factorio server in Debian 8.x-9.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install Factorio server in Debian 8.x-9.x | |
apt-key update; apt-get update && apt-get -y install lsb-release ca-certificates | |
[ ! -d /opt ] && mkdir -p /opt; | |
cd '/opt' | |
apt-get -y install git mc screen | |
git clone https://github.com/Bisa/factorio-init.git | |
useradd factorio | |
ln -s /opt/factorio-init/bash_autocomplete /etc/bash_completion.d/factorio | |
source /opt/factorio-init/bash_autocomplete | |
cp /opt/factorio-init/config.example /opt/factorio-init/config | |
/opt/factorio-init/factorio install | |
rm /opt/factorio/saves/server-save.zip | |
#chown -R factorio:factorio /opt/factorio | |
cp /opt/factorio-init/factorio.service.example /etc/systemd/system/factorio.service | |
# Edit the service file to suit your environment then reload systemd | |
systemctl daemon-reload | |
## Verify that the server starts | |
# systemctl start factorio | |
cp /opt/factorio/data/server-settings.example.json /opt/factorio/data/server-settings.json | |
echo "replace you config - /opt/factorio/data/server-settings.json" | |
echo "/opt/factorio-init/factorio status" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment