Closed Bisa closed 7 years ago
Hi,
today I've been working on a spec file to create a Factorio headless server rpm package (works on F23, will test it on CentOS 7 as soon as I have time). Maybe this could be an option for your installation issues? It doesn't automatically fetch/package the latest version, tough.
Kind regards
Sure sounds interesting @poettler-ric =)
Sorry, I completely forgot the link: https://github.com/poettler-ric/fedora-spec/tree/master/factorio-server
Not sure if it is relavent here, or may be changing, but the ./factorio install "factorio.tar.gz" currently gives an error which doesn't make much sense. The error is:
Could not find factorio config file: /opt/factorio/config/config.ini If this is the first time you run this script; You might need to generate the config.ini by running: sudo -u factorio /opt/factorio/bin/x64/factorio --start-server factorio-init-save
But if you are trying to install, how would you actually run this? Anyway I just added an if to this check:
if ! [ $1 == install ]; then if [ -z "${FCONF}" ]; then echo "FCONF config missing! Add it to your config file" exit 1 fi if ! [ -e ${FCONF} ]; then echo "Could not find factorio config file: ${FCONF}" echo "If this is the first time you run this script; You might need to generate the config.ini" echo "by running: sudo -u $USERNAME ${BINARY} --start-server ${SAVE_NAME}" exit 1 fi fi
Maybe doesn't need to include the check if the FCONF variable exists and mybe this is valid for other options too.
Excellent script however.
I'll be revisiting the install section to correct this eventually, at the moment I'm still waiting for something like this tho https://forums.factorio.com/viewtopic.php?f=6&t=22210
Introducing the latest headless download option in #105 I've opted for keeping it at that for now.
If you want to "force" a reinstall or update, simply run rm -rf /path/to/factorio && factorio install
I'm thinking of enhancing the installation process by using the freely provided headless tar package.
Options like "clean install" or "force update latest version" spring to mind, but without a readily accessible link to the "latest" version I'm not going to mess around with this - if you're watching this, feel free to show some love in https://forums.factorio.com/viewtopic.php?f=6&t=22210 to support this.