nouseforname wrote:the status check is done by checking if the pidfile exist, pidfile (eg. SAMPLEdedi.pid) includes the PID of the running process. if the pidfile don't exist there will be no restart, if the pidfile exist, the script check for any process with this PID, if no PID found, it will restart. i never had problems with this, but you should check if the pidfile includes the correct PID after starting a server.
Well the Pidfiles of the dediservers, are in the right path. An the processid must be right, cause the stop syntax works fine.
Well, i think the Problem is, that on my Server runs 5 Server. All the Serverfiles have the same name eg. : TrackmaniaServer
I think thats the Problem.
In some Pidfiles there are 3 Processids or more. I cant understand this
nouseforname wrote:
Why SUDO is not the best? could you try to explain and tell me whats better? and how did you do it now? let me see thc code pls.
i still use Debian4^^ tried upgrading but fails due to some apllication i use.^^
i will try to explain . The Sudo command works not under the www-data user. I have place the User in /etc/sudoers file, but it doesnt work. No rights to write pidfiles. cause every web runs under special Usernames.
like : webuser1 with group webusergroup1 (as example). so www-data has no rights on this files.
The curios Thing is, the script startups (when you click a command) with www-data not with webuser1.webusergroup1
in the file with the command for start / stop / restart comment the sudo out. the rest of your code is the same. i write the exact code here, when i back home.