Jump to content

Native Linux server (with management scripts)


Alloc

Recommended Posts

H3llghost is almost right ... the first character being a shebang of course ... ;)

#!/bin/sh
. /usr/local/lib/7dtd/common.sh

telnetCommand $1 "say Hello to $4"

 

hello Alloc, I am getting this error message:

 

-bash: sel: command not found

-bash: sel: command not found

-bash: sel: command not found

Telnet not enabled or no password set.

 

My server is Debian 7

 

Hmz, should really update this part of the scripts ...

Try this:

#!/bin/sh
. /usr/local/lib/7dtd/common.sh
checkRootLoadConf

telnetCommand $1 "say Hello to $4"

Link to comment
Share on other sites

Ah, sorry, there's an error in the documentation. All hooks go to a folder called "hooks" in SDTD_BASE.

So the path for the hook should be:

/home/sdtd/hooks/playerConnect/bemVindo.sh

 

Also in your screenshot it looks like there's an empty line before the shebang which should not be the case (even though this probably won't cause a problem).

Link to comment
Share on other sites

Seconds ;)

You don't want the script to block for hours or even minutes. Should never be greater than like 3sec. And only be required for stuff like entity querying as you have to wait for the output to be complete before killing the connection.

Link to comment
Share on other sites

hello friend, I'm getting this error message.

 

/home/sdtd/instances/brasil/players.xml:6.112: Attribute nick redefined

do" playtime="0" logins="1" lastlogin="xxxxxxxx" online="true" entityid="5982"

^

/home/sdtd/instances/brasil/players.xml:6.112: Attribute playtime redefined

do" playtime="0" logins="1" lastlogin="xxxxxxx" online="true" entityid="5982"

^

/home/sdtd/instances/brasil/players.xml:6.112: Attribute logins redefined

do" playtime="0" logins="1" lastlogin="xxxxxxx" online="true" entityid="5982"

^

/home/sdtd/instances/brasil/players.xml:6.112: Attribute lastlogin redefined

do" playtime="0" logins="1" lastlogin="xxxxxx" online="true" entityid="5982"

^

/home/sdtd/instances/brasil/players.xml:6.112: Attribute online redefined

do" playtime="0" logins="1" lastlogin="xxxxxxx" online="true" entityid="5982"

^

/home/sdtd/instances/brasil/players.xml:6.112: Attribute entityid redefined

do" playtime="0" logins="1" lastlogin="xxxxxxx" online="true" entityid="5982"

 

 

Question 2: and when I use the command "7dtd.sh kill myinstance" and "7dtd.sh start myinstance" the days of the game back to zero.

Link to comment
Share on other sites

Hm, might be the same problem as I saw before ... I assume you are using a version of the scripts prior to v.22? If so please update and delete the players.xml (or at least clean it up manually).

 

Might also be related to the Telnet thread having crashed. Will try to add some checks in there.

/EDIT: Nope, should not be a problem ;)

 

Regarding Q2: I think this only happens when the Telnet thread crashed so shutdown does not work. Can't do anything about it as that's a bug in the game itself.

Edited by Alloc (see edit history)
Link to comment
Share on other sites

Regarding Q2: I think this only happens when the Telnet thread crashed so shutdown does not work. Can't do anything about it as that's a bug in the game itself.

 

It is an issue with the telnet thread, the kill uses normally the shutdown command. The "work-around" is to use the shutdown via console as player.

It should be fixed on server side, when the kill signal is send to save the day too. But at the moment remember the day and set it manually or shutdown the server when you are connected to the server via console and killing all monitor-log.sh after it.

Link to comment
Share on other sites

Hello friend :) ... Have updated the script and cleaned the player.xml file. But the error message continues.

 

 

Hm, might be the same problem as I saw before ... I assume you are using a version of the scripts prior to v.22? If so please update and delete the players.xml (or at least clean it up manually).

 

Might also be related to the Telnet thread having crashed. Will try to add some checks in there.

/EDIT: Nope, should not be a problem ;)

 

Regarding Q2: I think this only happens when the Telnet thread crashed so shutdown does not work. Can't do anything about it as that's a bug in the game itself.

Link to comment
Share on other sites

Linux server with no scripts

 

I'm trying to run a dedicated server but without the custom management scripts. My reasons for it are: I'm on a Gentoo box (64bit), not a Debian system; I want to adhere to the same workflow I have set up for other dedicated servers; I will only want to run one instance of the 7dtd server.

 

I did initially try out the steps laid out at https://7dtd.illy.bz/ , adapting for the differences in my system but it failed when I got to the start-stop daemon. I wasn't too surprised about that since I'm using Gentoo. I tried to start the server manually straight out of the engine folder but it failed (see below code tag). After this, I removed all the files I installed following the guide.

 

So I started a fresh install following my own dedicated server setup with steam. I installed the windows 7dtd files with steam at '/srv/sevendaysd/server', downloaded 'http://illy.bz/fi/7dtd/linux_files.tar.gz', and made sure the 32bit SteamworksManaged.dll was in 7DaysToDie_Data/Managed. I was unsure what to do with the Linux engine files since the engine/ folder appears to be the install root, my '~/server/', and there are other files outside that directory in the arachive. I just merged the engine files with my '~/server/' and put the extra lib*.so in there too.

 

When I run 7DaysToDie.x86 I am greeted with:

 

Set current directory to /srv/sevendaysd/server
Found path: /srv/sevendaysd/server/7DaysToDie.x86
Mono path[0] = '/srv/sevendaysd/server/7DaysToDie_Data/Managed'
Mono path[1] = '/srv/sevendaysd/server/7DaysToDie_Data/Mono'
Mono config path = '/srv/sevendaysd/server/7DaysToDie_Data/Mono/etc'

 

and a closed port 25000.

 

So I adapted the 'startdedicated.bat' to 'startdedicated.sh', ran that, and got the same results.

 

I don't know what's going on under the hood here and why it isn't working. Unfortunately for me, the only Linux dedicated server tutorials are for this management script setup which neither works on my system nor do I want to use it.

 

Any help would be appreciated.

Link to comment
Share on other sites

That output you posted is the normal one you get when you start up 7dtd.

 

I would still suggest using the scripts, start-stop-daemon should not be a problem as I included the required source in the archive just for this purpose. If there's something wrong with compiling it we can figure it out together ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...