diff --git a/README.md b/README.md index 62f66ea..218a89b 100644 --- a/README.md +++ b/README.md @@ -10,25 +10,7 @@ We assume you have created the `steam` user to store steamcmd and your ARK serve ## Requirements -### Increase max open files - -Edit /etc/sysctl.conf and set: -``` -fs.file-max=100000 -``` -Edit /etc/security/limits.conf and set these limits: -``` -* soft nofile 100000 -* hard nofile 100000 -``` -Add the following line to `/etc/pam.d/common-session` (Debian/Ubuntu) or `/etc/pam.d/system-auth` (RHEL/CentOS/Fedora): -``` -session required pam_limits.so -``` - -After these edits, you'll need to restart your bash session or reconnect to your SSH shell to make the changes effective. - -### Open firewall ports +To allow your ARK server to communicate with the outside you have to open some ports in your firewall: ```sh iptables -I INPUT -p udp --dport 27016 -j ACCEPT diff --git a/tools/arkmanager b/tools/arkmanager index 089c753..99e737d 100755 --- a/tools/arkmanager +++ b/tools/arkmanager @@ -34,6 +34,7 @@ timestamp=$( date +%T ) GREEN="\\033[1;32m" RED="\\033[1;31m" NORMAL="\\033[0;39m" +maxOpenFiles=100000 arkmanagerLog="arkmanager.log" # here are logged the actions performed by arkmanager arkserverLog="arkserver.log" # here is logged the output of ShooterGameServer @@ -187,6 +188,8 @@ doStart() { arkserveropts="${arkserveropts}?listen" # run the server in background echo "$timestamp: start" >> "$logdir/$arkserverLog" + # set max open files limit before we start the server + ulimit -n $maxOpenFiles nohup "$arkserverroot/$arkserverexec" "$arkserveropts" "$logdir/$arkserverLog" 2>&1 & # output of this command is logged echo "$timestamp: start" >> "$logdir/$arkmanagerLog" tput rc; tput ed;