SwordArMor-gentoo-overlay/games-server/factorio-server/files/factorio.initd
Alarig Le Lay e6a6ff1837
games-server/factorio-server: Waiting a bit in the initrd
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr
2022-01-15 15:14:40 +01:00

26 lines
546 B
Plaintext
Executable file

#!/sbin/openrc-run
# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="factorio daemon"
description="2D infinite game"
command="${FACTORIO_PATH}/bin/x64/factorio"
command_args="${FACTORIO_OPTS}"
retry=15
command_background=1
directory="${FACTORIO_PATH}"
pidfile="/run/${RC_SVCNAME}.pid"
command_user="${FACTORIO_USER:-root}"
command_group="${FACTORIO_GROUP:-root}"
depend() {
need net
}
start_pre() {
checkpath -d -m 0750 -o "${command_user}:${command_group}" \
"${directory}"
}