diff --git a/games-server/factorio-server/factorio-server-0.17.79.ebuild b/games-server/factorio-server/factorio-server-0.17.79.ebuild index d671866..de12599 100644 --- a/games-server/factorio-server/factorio-server-0.17.79.ebuild +++ b/games-server/factorio-server/factorio-server-0.17.79.ebuild @@ -21,10 +21,19 @@ S="${WORKDIR}/factorio" src_install() { insinto /opt/factorio - doins -r data - doins config-path.cfg + doins -r * exeinto /opt/factorio/bin/x64 doexe bin/x64/factorio + newinitd "${FILESDIR}"/factorio.initd 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." +} diff --git a/games-server/factorio-server/files/factorio.confd b/games-server/factorio-server/files/factorio.confd index ca8997b..0154785 100644 --- a/games-server/factorio-server/files/factorio.confd +++ b/games-server/factorio-server/files/factorio.confd @@ -1,4 +1,4 @@ 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_GROUP="factorio"