mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-13 03:18:28 +00:00
daemon should now work.
- added daemon config - daemon can be executed as root (but will run commands as steam user) - daemon saves logs to the same directory of manager
This commit is contained in:
parent
31b5fc3a4f
commit
1639a58e37
@ -1,13 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Global variables
|
||||
source /etc/arkdaemon.cfg
|
||||
source /home/${steamuser}/.arkmanager.cfg
|
||||
|
||||
NAME=arkmanager_daemon
|
||||
DESC="ARK manager daemon used to start the server and keep it updated"
|
||||
PIDFILE="/var/run/${NAME}.pid"
|
||||
LOGFILE="/var/log/${NAME}.log"
|
||||
LOGFILE="${logdir}/${NAME}.log"
|
||||
|
||||
DAEMON="sh /usr/bin/arkmanager daemon"
|
||||
|
||||
START_OPTS="--start --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON}"
|
||||
DAEMON="sh /usr/bin/arkmanager update"
|
||||
|
||||
START_OPTS="--start --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} --user=${steamuser}"
|
||||
STOP_OPTS="--stop --pidfile ${PIDFILE}"
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
2
tools/arkdaemon.cfg
Normal file
2
tools/arkdaemon.cfg
Normal file
@ -0,0 +1,2 @@
|
||||
# user of your steamcmd and ARK server instance (don't use root!)
|
||||
steamuser =
|
||||
@ -17,6 +17,10 @@ if [ ! -z $1 ]; then
|
||||
mv arkmanager.cfg /home/$1/.arkmanager.cfg
|
||||
chown $1 /home/$1/.arkmanager.cfg
|
||||
|
||||
# Copy arkdaemon.cfg inside /etc folder
|
||||
mv arkdaemon.cfg /etc/arkdaemon.cfg
|
||||
chown $1 /etc/arkdaemon.cfg
|
||||
echo ${1} >> /etc/arkdaemon.cfg
|
||||
|
||||
else
|
||||
echo "You must specify your steam user to install ARK Tools. Usage: ./install.sh steam"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user