Jump to content

Running atavism server on linux


Exanis

Recommended Posts

Hello,

 

There is a little mistake on this page : http://atavismonline.com/wiki/doku.php/setting_up_the_server

 

The mistake is on the last line : Note: If you are running on Ubuntu and having trouble starting the server you may need to delete the top line in both auth.sh and world.sh.

 

Actually, you don't need to delete this line. Thing is, the shebang (the line starting with #!) in world.sh and auth.sh is actually incorrect : you are using bash's syntax but asking for sh interpreter to read it. In most modern linux system, /bin/sh is actually an alias to /bin/bash but is used to trigger a "strict mode" on bash, removing it's own functionnality to better emulate sh's traditionnal ones.

 

So, if you want to have the server working on linux and have this error :

 

./auth.sh: 21: ./auth.sh: Syntax error: "(" unexpected

 

Just change the shebang (the first line) of auth.sh and world.sh to this :

 

#!/bin/bash

 

And everything will work. A better solution would be to actually replace in atavism's original source code the shebang. I didn't test but i'm 99% sure it will also work on cygwin, and it will have the correct behavior.

Link to comment
Share on other sites

Changing the .sh to .bash will not work since linux is not using the extension to choose the file handler (man 1 file to get more information on how linux choose file handler). You have to edit the file itself, as i described, to make it work.

 

I don't know who made the wiki I linked in the first post, but it does not contain the information and it does contain a wrong way to fix the problem - although it may work, depending on your current shell, and bash is the most common shell on linux.

 

And (after testing), the change do work on cygwin.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recommended Cloud Solution


    ksweb.net

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.