26.10.2016, 20:23
I've got a small problem... which is my server randomly sometimes goes off, but thats not the problem cuz thats just a step to fix it.
But the problem is, it deletes the server_log file when ever it goes down (or i'd say whenever i start server it deletes old logs) so i cant see where's the problem.
Second i've added that script to keep server online, but i am unsure if its correct, so lemme explain:
I've created a user called "samp" for server. the dir is /dayz
Here's the script
Name: checksamp.sh
It does not restart the server on its own... and thats a problem. (tho i do not run it, do i need to?)
Main Dir and then:
But the problem is, it deletes the server_log file when ever it goes down (or i'd say whenever i start server it deletes old logs) so i cant see where's the problem.
Second i've added that script to keep server online, but i am unsure if its correct, so lemme explain:
I've created a user called "samp" for server. the dir is /dayz
Here's the script
PHP код:
#!/bin/sh
PROCESS_COUNT=$(ps -fu samp | grep samp03svr | grep -v grep | wc -l)
case $PROCESS_COUNT in
0) /home/samp/dayz/
;;
1) #OK, program is already running once
;;
*) #OK, program is already multiple times
;;
esac
It does not restart the server on its own... and thats a problem. (tho i do not run it, do i need to?)
Main Dir and then:
PHP код:
samp@sf-cnrcom:~$ cd dayz
samp@sf-cnrcom:~/dayz$ ls
announce gamemodes samp03svr
checksamp.sh include samp.ban
LICENSE samp.ban.temp
mysql_log.html samp-npc
mysql_log.txt scriptfiles
nohup.out server.cfg
npcmodes server.cfg.save
plugins server_log.txt
filterscripts README
samp@sf-cnrcom:~/dayz$