daniel1965
Programmer
I need to be able to check if sendmail is running on a Linux server.
I was just going to get the pid from the /var/run/sendmail.pid file and then see if a process with that value was actually running (via ps & grep).
But the problem I have is that the sendmail.pid file is owned by root (with 600 permissions) and the user from which I need to do the check is NOT root!
I was thinking of just changing the permissions to something like 644 but am thinking this may cause problems(??).
Does anyone know of another way I can check if sendmail is running without having to refer to the pid file? I guess I can just use ps & grep but there seem to be a lot of processes listed that relate to sendmail and, without a known pid, I am not sure which of these I should be checking for!
I was just going to get the pid from the /var/run/sendmail.pid file and then see if a process with that value was actually running (via ps & grep).
But the problem I have is that the sendmail.pid file is owned by root (with 600 permissions) and the user from which I need to do the check is NOT root!
I was thinking of just changing the permissions to something like 644 but am thinking this may cause problems(??).
Does anyone know of another way I can check if sendmail is running without having to refer to the pid file? I guess I can just use ps & grep but there seem to be a lot of processes listed that relate to sendmail and, without a known pid, I am not sure which of these I should be checking for!