SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 03/12/2008, 03:32 PM   #1
LeePL
Little Clucker
 
Join Date: Jun 2008
Posts: 30
Reputation: 0
Default Maintaining the online server. Help!

Hello members,
My problem concerns about whether there is any restarter server to samp, for Linux?
Is there such a thing? Please send me a quick answer, if possible...

Sorry about my English, but I'm Polish and do not know too much about it...

__________________
Love :*
LeePL is offline   Reply With Quote
Old 03/12/2008, 03:47 PM   #2
dextervip
Little Clucker
 
Join Date: Feb 2008
Posts: 41
Reputation: 0
Default Re: Maintaining the online server. Help!

All you need to use the program below is a Linux environment, and the possibility to use cron. This program will check if the samp02svr process is running, and if it isn't, start it up again. You'll need to install the following crontab:
Code:
*/5 * * * * /path/to/samp/checksamp.sh
checksamp.sh:
Code:
#!/bin/sh
 
PROCESS_COUNT=$(ps -fu root | grep samp02svr | grep -v grep | wc -l)
case $PROCESS_COUNT in
0) /path/to/samp02svr &
;;
1) #OK, program is already running once
;;
*) #OK, program is already multiple times
;;
esac
Make sure that you have to correct paths set up, the script won't work if you haven't. The script is currently unable to handle multiple SA-MP Servers on the same machine, but works perfectly when there is only one running/needed. You need to chmod the checksamp.sh file to 0755 (+x)!
dextervip is offline   Reply With Quote
Old 03/12/2008, 03:53 PM   #3
LeePL
Little Clucker
 
Join Date: Jun 2008
Posts: 30
Reputation: 0
Default Re: Maintaining the online server. Help!

Thank you for your help and for that I somehow understand. Cheers
__________________
Love :*
LeePL is offline   Reply With Quote
Old 04/12/2008, 07:24 PM   #4
caribe88
Huge Clucker
 
Join Date: Apr 2008
Posts: 217
Reputation: 0
Default Re: Maintaining the online server. Help!

I have 3 server on linux and sometimes they have error on reading the game mode, filterscprts or so bud more as nohup ./samp02Xsvr i dont use and they work perfect
caribe88 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making samp server and getting it online and in server list Doom8890 Server Support 34 15/12/2012 02:45 PM
[TUT]Eigenen Server machen + Server online bekommen ~Ricky~ Archive 7 27/02/2011 11:13 PM
How do I get my server online? Olek95 Server Support 0 14/04/2010 08:38 PM
[HELP]my server is online but not in the internet server list.... kevinwalter Server Support 17 16/08/2009 02:29 PM
Online server help =( aidiewright Server Support 12 01/02/2009 08:33 PM


All times are GMT. The time now is 01:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.