operative Posted September 22, 2009 Share Posted September 22, 2009 Hello everyone, I'm trying to write a php file that executes a shell command (using shell_exec()) to kill a process when a button on a website is pressed. The reason why i'm doing this is, that this server (wow server emulator) crashes sometimes and i don't want to log on via ssh every time and kill it using the kill (or pkill). so far i'm getting the PID of the server using 'pidof' or directly using pkill -f in a shell script. What i totally forgot was the fact, that the wow server is running under it's own user (apache2 also has it's own user) so my question is: how can i kill the process of another user using shell script? This is my configuration: Ubuntu 9.04 Server wow server emulator apache2 + php Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.