RegisterRegister    Log inLog in    SearchSearch   

Post new topic   Reply to topic
 
View previous topic :: View next topic  
Author Message
carlino1994



PostPosted: Thu Apr 01, 2010 3:39 am    Post subject: Problems with CHMOD Reply with quote

Hello,
I have a Linux host, and when I install in a subdomain "GTA: San Andreas" (gtasa), GameCreate set CHMOD to 777 only to "samp03svr" file (the start file), but no to "announce" e "samp-npc" executable files.

The first file "announce" add the gtasa server to public listing in SA:MP client, and the second file "samp-npc" start the server bot (added in the SA:MP 0.3a).

How can I resolve?

P.S.: I have tried to create Custom Package, with adding by default CHMOD 777 to those files, but no resolve.

----

Anothere request: In the Windows host, if I using GameCreate for "GTA: San Andreas", the "announce.exe" start automatically if in the server.cfg there is the string "announce 1", but in Linux, if I set manually perms to 777 on file "announce", this not start.
Back to top
View user's profile Send private message
adbot



PostPosted: Thu Mar 31, 2011 3:57 am 

Andrew
Mammoth


PostPosted: Thu Apr 01, 2010 8:46 am    Post subject: Reply with quote

Hi,

Correct, by default GameCreate only chmod's the executable its about to start.

It sounds like you've made a custom package, great.

What you can do now is create a new file on your content server:

/wwwroot/linux/gtasa.op.txt

Inside it, add filenames you would like to make executable, each on their own line:

Code:

announce
samp-npc


Now build a new update and deploy it.

Existing installs will have those files marked executable, and new installs will now automatically mark those files as executable too.

This should also fix your auto-starting of announce.exe, it probably didn't start because the file was not executable.
Back to top
View user's profile Send private message
carlino1994



PostPosted: Thu Apr 01, 2010 4:25 pm    Post subject: Reply with quote

Grat! Very Happy
But if I don't add the samp03svr to the gtasa.op.txt file, it's is not executable.

Now the samp-npc start, but if I add or remove this code to the server.cfg (from GameCreate) the announce don't start.
Code:
announce 1
query 1


I can start this executable only manually, by enter in the game folder and insert ./announce in the SSH. Sad
Why?

---

If I download a server version from the game site, and run it manually by start ./samp03svr, automatically this start the samp-npc (now this is automatically started) and the announce (now this is NOT automatically started).
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Thu Apr 01, 2010 4:43 pm    Post subject: Reply with quote

Probably because GameCreate does not copy the current environment variables (such as $HOME) before launching the process.

See this post http://www.gamecreate.com/forum/viewtopic.php?p=8321&highlight=#8321 for more information. Try creating your own wrapper script for 'announce' (rename announce to announce_real and make the wrapper script called announce).
Back to top
View user's profile Send private message
carlino1994



PostPosted: Thu Apr 01, 2010 5:26 pm    Post subject: Reply with quote

But, how I can set $HOME to game directory?

Code:
#!/bin/sh
HOME=/home/[your path]
export HOME
./server_real $@


Foreach gtasa game, I need to change manually $HOME in this file... Confused
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Thu Apr 01, 2010 5:27 pm    Post subject: Reply with quote

Try making this a file in GameCreate you write out, and use %server:directory% variable in the file definition to obtain the current directory path.
Back to top
View user's profile Send private message
carlino1994



PostPosted: Thu Apr 01, 2010 7:44 pm    Post subject: Reply with quote

I have renamed file announce to announce_exe.

From GameCreate I have created the file announce with this content:
Code:
#!/bin/sh
HOME=%server:directory%
export HOME
./announce_exe $@


After, I have chmodded to 777 the file announce and restared the server, but this file don't automatically start. Sad
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Thu Apr 01, 2010 8:23 pm    Post subject: Reply with quote

Try running GTA SAMP in a SCREEN session (choose Require Screen via Game Configuration).

Add this line after ./announce_exe $@:
sleep 10000

Then when the server starts, attach the screen using screen -r via shell, and look for any errors printed to the console window after it tired to start announce_exe
Back to top
View user's profile Send private message
carlino1994



PostPosted: Thu Apr 01, 2010 8:37 pm    Post subject: Reply with quote

On SSH:
Quote:
There is no screen to be resumed.
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Fri Apr 02, 2010 10:23 am    Post subject: Reply with quote

Make sure you're running the latest GameCreate Client (Download on the left), and that 'require screen' is chosen.
Back to top
View user's profile Send private message
carlino1994



PostPosted: Fri Apr 02, 2010 11:11 pm    Post subject: Reply with quote

I'll update GameCreate this weekend on my hosts, and after I retry.

Thanks for now. Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum powered by phpBB © 2001, 2005 phpBB Group
GameCreate Service Terms | Privacy Policy | © Copyright Mammoth Media 2001-2007
GameCreate™ is a trademark of Mammoth Media Pty Ltd. GameCreate® is a registered trademark in Australia.