diff options
author | Vöjket | 2021-05-08 18:10:31 -0400 |
---|---|---|
committer | Vöjket | 2021-05-08 18:10:31 -0400 |
commit | 030140e377ecf331eb9074e28ce5193f68dbb297 (patch) | |
tree | 1d916c1fe0bd2464b789f18df202092ad22f8b9c | |
parent | d3d4ac1a37bf02c496988426ca85ebcdbc45d412 (diff) | |
download | aur-030140e377ecf331eb9074e28ce5193f68dbb297.tar.gz |
Updated to 3.1.0, modified configs significantly
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | factorio-init.conf | 73 | ||||
-rw-r--r-- | factorio-init.service | 9 |
4 files changed, 104 insertions, 53 deletions
@@ -1,19 +1,21 @@ pkgbase = factorio-init - pkgdesc = A simple factorio init script for linux - pkgver = 2.5.0 + pkgdesc = A factorio init script in bash + pkgver = 3.1.0 pkgrel = 1 url = https://github.com/Bisa/factorio-init arch = any license = MIT depends = bash - depends = factorio-headless - backup = etc/conf.d/factorio-init - source = https://github.com/Bisa/factorio-init/archive/2.5.0.tar.gz - source = factorio-init.service + depends = curl + depends = wget + optdepends = bash-completion: autocompletion support + backup = etc/factorio-init.conf + source = factorio-init-3.1.0.tar.gz::https://github.com/Bisa/factorio-init/archive/3.1.0.tar.gz source = factorio-init.conf - sha256sums = a1d90b5b1804a932e258ccf43dfd7cd7ffcd44ae8b83d87203187f0469d17789 - sha256sums = 876eba92ba84dfc473fa23915525c4123cebfec474151704c515aae18ae81dfb - sha256sums = 0dd4fd75cf3448451a1b55bdf6bc38a4b9654a8d125cac391b180f70732a62e0 + source = factorio-init.service + sha256sums = 32b51b118b0ea21bd883d2afa73db0b2ff5b744edf4951af78cc77213dfd3403 + sha256sums = e79742ae05e027bb00ab2e86a7d005b172a72f593c9cf54dbd00d4f789b464c4 + sha256sums = dfff03f3798c8a6a7d55271483856320d1feb4831679172905d93ed4aed89dd3 pkgname = factorio-init @@ -1,40 +1,45 @@ -# Maintainer: xiretza <xiretza+aur@gmail.com> +# Maintainer: vojket <vojket+aur@protonmail.com> +# Contributor: xiretza <xiretza+aur@gmail.com> pkgname=factorio-init -pkgver=2.5.0 +pkgver=3.1.0 pkgrel=1 -pkgdesc="A simple factorio init script for linux" +pkgdesc="A factorio init script in bash" arch=('any') url="https://github.com/Bisa/factorio-init" license=('MIT') depends=('bash' - 'factorio-headless') -backup=("etc/conf.d/factorio-init") -source=("https://github.com/Bisa/factorio-init/archive/${pkgver}.tar.gz" - "factorio-init.service" - "factorio-init.conf") -sha256sums=('a1d90b5b1804a932e258ccf43dfd7cd7ffcd44ae8b83d87203187f0469d17789' - '876eba92ba84dfc473fa23915525c4123cebfec474151704c515aae18ae81dfb' - '0dd4fd75cf3448451a1b55bdf6bc38a4b9654a8d125cac391b180f70732a62e0') + 'curl' + 'wget') +optdepends=('bash-completion: autocompletion support') +backup=("etc/factorio-init.conf") +source=("$pkgname-$pkgver.tar.gz::https://github.com/Bisa/factorio-init/archive/$pkgver.tar.gz" + "factorio-init.conf" + "factorio-init.service") +sha256sums=('32b51b118b0ea21bd883d2afa73db0b2ff5b744edf4951af78cc77213dfd3403' + 'e79742ae05e027bb00ab2e86a7d005b172a72f593c9cf54dbd00d4f789b464c4' + 'dfff03f3798c8a6a7d55271483856320d1feb4831679172905d93ed4aed89dd3') package() { - cd "${srcdir}" + cd "$srcdir" - install -Dm644 factorio-init.service -t "${pkgdir}/usr/lib/systemd/system/" - install -Dm644 factorio-init.conf "${pkgdir}/etc/conf.d/factorio-init" + _instdir="$pkgdir/usr/share/$pkgname" + _upstream="$srcdir/$pkgname-$pkgver" - cd "${srcdir}/${pkgname}-${pkgver}" + # Install and symlink bash script + install -Dm655 "$_upstream/factorio" "$_instdir/factorio-init" + install -d "$pkgdir/usr/bin/" + ln -s "/usr/share/factorio-init/factorio-init" "$pkgdir/usr/bin/factorio-init" - install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/factorio-init/" + # Install and symlink config file + install -Dm644 factorio-init.conf "$pkgdir/etc/factorio-init.conf" + ln -s "/etc/factorio-init.conf" "$_instdir/config" - _pkgdir="${pkgdir}/usr/share/${pkgname}/" - install -Dm644 bash_autocomplete -t "${_pkgdir}" - install -D factorio "${_pkgdir}/factorio-init" + # Install bash autocompletions + install -Dm644 "$_upstream/extras/bash_autocomplete" "$pkgdir/usr/share/bash-completion/completions/factorio-init/bash_autocomplete" - install -d "${pkgdir}/usr/share/bash-completion/completions/" - install -d "${pkgdir}/usr/bin/" - - ln -s "/usr/share/${pkgname}/bash_autocomplete" "${pkgdir}/usr/share/bash-completion/completions/factorio-init" - ln -s "/usr/share/${pkgname}/factorio-init" "${pkgdir}/usr/bin/factorio-init" - ln -s "/etc/conf.d/factorio-init" "${_pkgdir}/config" + # Install systemd service + install -Dm644 "factorio-init.service" "$pkgdir/usr/lib/systemd/system/factorio-init.service" + # Install license + install -Dm644 "$_upstream/LICENSE" "$pkgdir/usr/share/licenses/factorio-init/LICENSE" } diff --git a/factorio-init.conf b/factorio-init.conf index a7f3d0b19ed3..5d31eea8f8c2 100644 --- a/factorio-init.conf +++ b/factorio-init.conf @@ -4,8 +4,15 @@ # this script is not behaving the way you expect it to do DEBUG=0 +# Enable alternative glibc directory for systems using older glibc versions ( ie RHEL CentOS and others ) +ALT_GLIBC=0 +# Put the Absolute path to the side by side glibc root here +ALT_GLIBC_DIR="/opt/glibc-2.18" +#Version of alt glibc goes here (i.e 2.18) +ALT_GLIBC_VER="2.18" + # What do you want to call this service? -SERVICE_NAME="Factorio-init" +SERVICE_NAME="factorio-init" # Which user/group is running factorio? # Running any public service as "root" is generally not recommended @@ -13,28 +20,43 @@ USERNAME=factorio USERGROUP=games # The absolute path to the factorio directory -FACTORIO_PATH=/var/lib/factorio/.factorio -WRITE_DIR=/var/lib/factorio/.factorio -BINARY=/usr/bin/factorio -# Server settings file, see data/server-settings.example.json -SERVER_SETTINGS=/etc/factorio/server-settings.json +FACTORIO_PATH=/usr/share/factorio + +# Server admin settings +# Server admin list file, must be in the following format: +# [ +# admin1, +# admin2, +# adminX +# ] +# If the file does not exist in ${FACTORIO_PATH}/data, a blank copy will be created. +ADMINLIST=${FACTORIO_PATH}/data/server-adminlist.json + +# The whitelist file is in the same format as the admin list file. +# If the file does not exist in ${FACTORIO_PATH}/data, it will not be used. +WHITELIST=${FACTORIO_PATH}/data/server-whitelist.json + +# The banlist file is in the same format as the admin list file. +# If the file does not exist in ${FACTORIO_PATH}/data, it will not be used. +BANLIST=${FACTORIO_PATH}/data/server-banlist.json # Port on which you want to run the server PORT=34197 -# Save the command/chat/log on server start? Default location /opt/factorio/server.out +# Save the command/chat/log on server start? Default location /opt/factorio/server.out # Setting this to 0 will cause the script to erase the log file on each start # If you set this to 1 you might want to apply logrotate on the log or it will eventually fill your disk SAVELOG=0 -# Factorio comes packaged in a tarball containing the directory named "factorio" -# when using this scripts update/install command we expect to see this very -# directory. If you want to supply your own update/install tar other than what you can download -# from factorio.com/download-headless you can use this option to tell the script this is ok. -# -# If you place your factorio install within a directory named "factorio" and you update/install -# with the official tarball you can safely ignore this option. -PACKAGE_DIR_NAME=factorio +# Delay starting the game server until the we confirm the pingpong servers are reachable. +# This makes sure that game server detects the correct external IP in a NAT setup. +# Useful for Cloud providers where VMs may start faster than their Internet connectivity is plumbed. +WAIT_PINGPONG=0 + +# Using install, it's possible to cache the tarballs fetched from Wube +INSTALL_CACHE_TAR=1 +# set this to a directory where you allow this script to create a 'factorio-install' directory +INSTALL_CACHE_DIR=/tmp # # narcotiq made a sweet update script for factorio and by cloning into this @@ -52,7 +74,28 @@ HEADLESS=1 UPDATE_USERNAME=you UPDATE_TOKEN=yourtoken UPDATE_EXPERIMENTAL=0 +# set this to a directory where you allow this script to create a 'factorio-update' directory. UPDATE_TMPDIR=/tmp +# The directory ${UPDATE_TMPDIR}/factorio-update will be used by the updater to store patches for factorio. +# If you set UPDATE_PERSIST_TMPDIR=1 this script will not try to clean up the directory. +# This will effectively cache the patch files for later use but be aware that you need to handle eventual clean-up +# of the ${UPDATE_TMPDIR}/factorio-update directory yourself. +UPDATE_PERSIST_TMPDIR=0 +# prevent the script from restarting factorio during updates by setting this to 1 +# (note! This also means that you will be prevented from applying updates with the +# script if the server is running) +UPDATE_PREVENT_RESTART=0 + +# +# There is also integration with Tantrisse's Factorio-mods-manager +# Uses UPDATE_USERNAME and UPDATE_TOKEN for mod management +# Access is exposed under the mod subcommand +# To install: +# git clone https://github.com/Tantrisse/Factorio-mods-manager.git +# + +# absolute path to the Factorio-mods-manager script +MOD_SCRIPT_DIR=/path/to/mods_manager.py # Extras # Additional binary arguments, these will be sent to the binary when issuing the "start" command diff --git a/factorio-init.service b/factorio-init.service index c270d26664c2..b1c86578b745 100644 --- a/factorio-init.service +++ b/factorio-init.service @@ -1,14 +1,15 @@ [Unit] -Description=Factorio Server Init Script -After=network.target +Description=Factorio Server +Wants=network-online.target +After=network.target network-online.target [Service] User=factorio -Group=games +Group=factorio # We will store a pid file in your ${WRITE_DIR}/server.pid # Adjust if you change the write dir of your server -PIDFile=/var/lib/factorio/.factorio/server.pid +PIDFile=/usr/share/factorio-init/server.pid Type=forking TimeoutStartSec=20 |