games-server/factorio-server: Improvements

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
Alarig Le Lay 2020-04-30 18:27:19 +02:00
parent d856cc2fd9
commit cf88149e16
Signed by: alarig
GPG key ID: 7AFE62C6DF8BCDEC
2 changed files with 12 additions and 3 deletions

View file

@ -21,10 +21,19 @@ S="${WORKDIR}/factorio"
src_install() { src_install() {
insinto /opt/factorio insinto /opt/factorio
doins -r data doins -r *
doins config-path.cfg
exeinto /opt/factorio/bin/x64 exeinto /opt/factorio/bin/x64
doexe bin/x64/factorio doexe bin/x64/factorio
newinitd "${FILESDIR}"/factorio.initd factorio newinitd "${FILESDIR}"/factorio.initd factorio
newconfd "${FILESDIR}"/factorio.confd factorio newconfd "${FILESDIR}"/factorio.confd factorio
} }
pkg_postinst() {
einfo "As factorio user, copy data/server-settings.example.json to"
einfo "config/server-settings.json and data/server-whitelist.example.json"
einfo "to config/server-whitelist.json and adapt it according to your needs."
einfo ""
einfo "Then, run bin/x64/factorio --create ./saves/my-save.zip to create a"
einfo "new map, and start the service."
}

View file

@ -1,4 +1,4 @@
FACTORIO_PATH="/opt/factorio" FACTORIO_PATH="/opt/factorio"
FACTORIO_OPTS="--start-server-load-latest --server-settings ./data/server-settings.json" FACTORIO_OPTS="--start-server-load-latest --server-settings config/server-settings.json --use-server-whitelist true --server-whitelist config/server-whitelist.json"
FACTORIO_USER="factorio" FACTORIO_USER="factorio"
FACTORIO_GROUP="factorio" FACTORIO_GROUP="factorio"