mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-12 10:58:28 +00:00
Have systemd (and upstart) run the script as the user
This commit is contained in:
parent
e560db7914
commit
fbd75687da
@ -215,7 +215,7 @@ else
|
||||
cp systemd/arkmanager.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
|
||||
sed -i "s|=/usr/libexec/arkmanager/|=${LIBEXECDIR}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
|
||||
cp systemd/arkmanager@.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
sed -i "s|=/usr/bin/|=${BINDIR}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
sed -i "s|=/usr/bin/|=${BINDIR}/|;s|=steam$|=${steamcmd_user}|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
if [ -z "${INSTALL_ROOT}" ]; then
|
||||
systemctl daemon-reload
|
||||
systemctl enable arkmanager.service
|
||||
@ -243,7 +243,7 @@ else
|
||||
cp systemd/arkmanager.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
|
||||
sed -i "s|=/usr/libexec/arkmanager/|=${LIBEXECDIR}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
|
||||
cp systemd/arkmanager@.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
sed -i "s|=/usr/bin/|=${BINDIR}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
sed -i "s|=/usr/bin/|=${BINDIR}/|;s|=steam$|=${steamcmd_user}|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
if [ -z "${INSTALL_ROOT}" ]; then
|
||||
systemctl daemon-reload
|
||||
systemctl enable arkmanager.service
|
||||
@ -277,7 +277,7 @@ else
|
||||
cp systemd/arkmanager.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
|
||||
sed -i "s|=/usr/libexec/arkmanager/|=${LIBEXECDIR}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager.service"
|
||||
cp systemd/arkmanager@.service "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
sed -i "s|=/usr/bin/|=${BINDIR}/|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
sed -i "s|=/usr/bin/|=${BINDIR}/|;s|=steam$|=${steamcmd_user}|" "${INSTALL_ROOT}/etc/systemd/system/arkmanager@.service"
|
||||
if [ -z "${INSTALL_ROOT}" ]; then
|
||||
systemctl daemon-reload
|
||||
systemctl enable arkmanager.service
|
||||
|
||||
@ -2,5 +2,6 @@
|
||||
Description=Daemon to start an ark server instance
|
||||
|
||||
[Service]
|
||||
User=steam
|
||||
ExecStart=/usr/bin/arkmanager useconfig %i run
|
||||
Type=simple
|
||||
|
||||
@ -2,6 +2,8 @@ description "ARK Server Tools service"
|
||||
|
||||
instance $service
|
||||
|
||||
setuid steam
|
||||
|
||||
env DAEMON="/usr/bin/arkmanager"
|
||||
|
||||
exec "$DAEMON" useconfig $service run
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user