The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Noob, script formatting query benjo Shell Programming and Scripting 2 03-03-2008 07:37 AM
Why does my script not work? (Noob Alert) bronkeydain Shell Programming and Scripting 4 02-21-2008 04:45 PM
can we create a GUI by shall script johnray31 Shell Programming and Scripting 1 07-24-2007 10:47 AM
Using PHP script with crontab (NOOB) Bobafart UNIX for Dummies Questions & Answers 5 04-26-2007 09:32 PM
how do I create an ftp script leonard905 UNIX for Dummies Questions & Answers 2 01-14-2005 06:25 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-09-2007
aron aron is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 1
noob. need help to create a script.

Hi All.

im a noob to scripting. could somone help me with a script please.

what i want to do is.

1. run a cmd in the script - qmqtool -s

this will give me an output similar to this.

Messages in local queue: 790
Messages in remote queue: 306
Messages in todo queue: 23

i then want to check if the message in the local queue is larger than the number of for example 100 ( but id like to be able to change this)

if its larger i want to do.

2. send email to me@mydomain.com with the output of the qmqtool -s and saying something like this

mail checker script has detected more than 100 emails in the local queue.

Messages in local queue: 790
Messages in remote queue: 306
Messages in todo queue: 23

the script will automatically fix this issue.

3. service stop spamd
4. service stop drwebd
5. service restart xinetd

thats all for now. ill run this script as a cron job every 1 hr.

appreciate any help.

cheers aron.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0