putty server restart? -
Bondage - 17.09.2014
How can i use putty to restart the server?
Re: putty server restart? -
rymax99 - 17.09.2014
It's SSH and if you started it you should be able to stop it.
http://www.cyberciti.biz/faq/kill-pr...linux-systems/
Re: putty server restart? -
Bondage - 17.09.2014
The a whole lot process, my server is up running, i connect the putty to the vps and now i dont know the commands to restart the server, can ya give me the commands
Re: putty server restart? -
Mauzen - 18.09.2014
Type 'top'. Look for the samp server process 'samp03svr'. If you found it, press 'k' and enter the pid for the 'samp03svr' process and press enter. Then press enter again to use the default process kill signal.
The server now is offline. Now you can start him as you did the first time. If you dont know how to start it, use the search as theres plenty of tutorials on this.
Re: putty server restart? -
Bondage - 18.09.2014
Quote:
Originally Posted by Mauzen
Type 'top'. Look for the samp server process 'samp03svr'. If you found it, press 'k' and enter the pid for the 'samp03svr' process and press enter. Then press enter again to use the default process kill signal.
The server now is offline. Now you can start him as you did the first time. If you dont know how to start it, use the search as theres plenty of tutorials on this.
|
Alright i get that but the command must be something like " nohup ./sampsvr & " isn't it? and how can i make it to the correct directory before doing that?
Re: putty server restart? -
ReD_DeVi - 18.09.2014
Your server files should be on the root or home then Type the nohup ./samp03svr &
Re: putty server restart? -
Bondage - 18.09.2014
Quote:
Originally Posted by ReD_DeVi
Your server files should be on the root or home then Type the nohup ./samp03svr &
|
Yeah until then everything is fine but after using nohup ./samp03svr & it shows this msg
Quote:
nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `./samp03svr': No such file or directory
|
Re: putty server restart? -
rymax99 - 18.09.2014
Quote:
Originally Posted by ReD_DeVi
Your server files should be on the root or home then Type the nohup ./samp03svr &
|
No, they shouldn't be in the root or home folder - you shouldn't even remotely consider them being in the root folder as that'd require running the SA-MP server as root which is a security risk. You should never run applications as root.
http://en.wikipedia.org/wiki/Filesys...archy_Standard
Re: putty server restart? - Guest4390857394857 - 18.09.2014
First use 'killall -9 samp03svr' to kill the existing process & then use 'nohup ./samp03svr'
Re: putty server restart? -
rymax99 - 18.09.2014
Quote:
Originally Posted by ShivRp
First use 'killall -9 samp03svr' to kill the existing process & then use 'nohup ./samp03svr'
|
Why would you use the TERM signal? Send a signal that will properly initiate the OnGameModeExit sequence - sending TERM won't do that. Use 'kill -h' and use a better signal.
Re: putty server restart? -
Bondage - 19.09.2014
Quote:
Originally Posted by rymax99
Why would you use the TERM signal? Send a signal that will properly initiate the OnGameModeExit sequence - sending TERM won't do that. Use 'kill -h' and use a better signal.
|
Okay guys, i just killed samp03svr and then i did nohup ./samp03svr & but what i got is this
Quote:
root@*******:~# nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `./samp03svr': No such file or directory
|
What do i do now? how could i turn back my server on.
Re: putty server restart? -
Alex Valdez - 19.09.2014
cd /whereyousampserverexecislocated
./samp03svr
Re: putty server restart? -
Pottus - 19.09.2014
Better yet use a starter .sh script
Code:
#!/bin/sh
log=samp.log
dat=`date`
samp="samp-server"
dir="."
cd $dir
echo "${dat} watchdog script starting." >>${log}
while true; do
echo "${dat} Server exited, restarting..." >>${log}
mv $dir/server_log.txt $dir/logs/server_log.`date '+%m%d%y%H%M%S'`
"$dir/$samp" >> $log
sleep 5
done
Re: putty server restart? -
Bondage - 19.09.2014
Quote:
Originally Posted by Alex Valdez
cd /whereyousampserverexecislocated
./samp03svr
|
Yerp its working but its only temporarly working, after i close the putty it goes off. I wanna make it perm tho
Re: putty server restart? -
Pottus - 19.09.2014
Quote:
Originally Posted by Bondage
Yerp its working but its only temporarly working, after i close the putty it goes off. I wanna make it perm tho
|
Use the starter script it will automatically restart your server in the case of a crash.
Re: putty server restart? -
Bondage - 19.09.2014
Quote:
Originally Posted by Pottus
Use the starter script it will automatically restart your server in the case of a crash.
|
You mean i gotta use that script on the putty?
Re: putty server restart? -
www - 19.09.2014
To kill samp03svr process:
To turn on it on:
Code:
nohup ./samp03svr &
So your server has been rebooted
Re: putty server restart? -
Bondage - 19.09.2014
Ok thank you everyone