startup script to monitor and stop exim


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers startup script to monitor and stop exim
# 1  
Old 04-11-2011
Error startup script to monitor and stop exim

hi i am a newbie to linux , we use Communigate for our mail on Centos. my problem is how to stop exim from running at startup. If exim starts our users cannot send their mail. i have stopped it running on all run levels but if i check exim status it says : Exim is stopped but the pid is running. How can i write a shell script to check and stop exim and its pid from starting.
# 2  
Old 04-11-2011
Replace exim executable with a shell script, hiding it in another dir or with a suffix?
This User Gave Thanks to DGPickett For This Post:
# 3  
Old 04-11-2011
pid is short for Process ID . This is the unique identity of the process in the run queue. I deduce that the status script is looking at a file which contains the PID of the "exim" process. Read the status script and find out where the file resides. If you are confident that the"exim" process is not running, delete the file.
# 4  
Old 04-13-2011
thanks but how do i do that. dont be offended i have very little linux experience

---------- Post updated at 01:44 PM ---------- Previous update was at 01:26 PM ----------

Quote:
Originally Posted by methyl
pid is short for Process ID . This is the unique identity of the process in the run queue. I deduce that the status script is looking at a file which contains the PID of the "exim" process. Read the status script and find out where the file resides. If you are confident that the"exim" process is not running, delete the file.
Thanks but how do i do that, sorry to offend but i am very new to linux.
# 5  
Old 04-13-2011
For instance, this short script starts qzzq and leaves a file with the pid, so you can ps -fp $pid to check on it, or kill -9 $pid to remove it, once you move the pid from the file to $pid.
Code:
#!/usr/bin/sh
 
nohup qzzq &
echo $! >/etc/qzzq.pid

 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Linux startup and stop scripts using SSH

I have a question. Actually I want to make two scripts, one is startup.sh and other is stopscript.sh so for example, I have 5 servers. Each server has two instances :- abc111 - Masters -cra4 abc222 -middle tear -cra abc333 -middle tear -cra1 abc444 -middle tear ... (1 Reply)
Discussion started by: siddharthjain
1 Replies

2. Shell Programming and Scripting

Startup script

I can't quite find a clear answer on how to properly write a start up script. Does anybody have any ideas?? (3 Replies)
Discussion started by: Huitzilopochtli
3 Replies

3. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

4. AIX

startup script

Hi I need the below script to be started whenever I reboot my aix server ? #cat cdbegin /cdirect/cdunix/ndm/bin/cdpmgr -i /cdirect/cdunix/ndm/cfg/cbspsdb01/initparm.cfg Please suggest how to add this to the startup ? (2 Replies)
Discussion started by: samsungsamsung
2 Replies

5. AIX

HACMP version 5.4 startup and stop scripts

Hi My hacmp version is 5.4 and it is a active passive cluster. Where can I find the startup and stop scripts? Please assist. Thanks. (2 Replies)
Discussion started by: samsungsamsung
2 Replies

6. UNIX for Dummies Questions & Answers

Startup Script Somewhere ?

Hello there! I need help. Everytime I login to my ssh, i see this: -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found any help ? thanks (0 Replies)
Discussion started by: fbauto1
0 Replies

7. Solaris

stop solaris 8 sendmail from running on startup

sorry i got this already... (3 Replies)
Discussion started by: itik
3 Replies

8. Solaris

stop a process to start at system startup

Hi all! I'm running Solaris 10 and have a question about how i can stop a certain program to start at system startup,for example, as it is now sendmail is starting but i don't need sendmail,on the other hand so would i be very glad to get cups up and running at startup, anyone who can explain where... (3 Replies)
Discussion started by: larsgk
3 Replies

9. Shell Programming and Scripting

Startup script

New in Unix, I am adding a line "route add 57.14.y.y 57.14.x.x" every day after rebooting the system. Where can I add the line so during boot up (the system is re-started every day by design (???) the line is executed? (I tried the /etc/rc2.d/S90 but for some reason the line needs to be added... (2 Replies)
Discussion started by: texaspanama
2 Replies
Login or Register to Ask a Question