Results 1 to 15 of 15
  1. #1
    Join Date
    Feb 2011
    Posts
    76

    Request Code to Script ...

    Hi every one how are you ?
    I want write a script

    The functionality of the program when installing any software on the server is sending a message to mail a pre-specified content of the message is the program was installed on the server and software is also pre-defined

  2. #2
    Join Date
    Mar 2011
    Posts
    41
    so are you asking for us to write you a script to do this? What language are you planning to have this written in? If it's php, you could start by looking at the mail() function.

  3. #3
    Join Date
    Feb 2011
    Posts
    76
    thanx for your reply
    I want bash or python or perl
    the scripts should install in the server by ssh root

  4. #4
    you might want to post in a python or perl section to get the best results

  5. #5
    Join Date
    Feb 2011
    Posts
    76
    Quote Originally Posted by coderiser View Post
    you might want to post in a python or perl section to get the best results
    OK would u show me the way to do that ?

  6. #6
    Join Date
    Feb 2011
    Posts
    76
    Please would you help me with this Project ??

  7. #7
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Please don't keep on bumping this thread. It's not reasonable to expect that anyone will write your program for you.

    If you want to make progress with your project:

    1. Specify in detail what this program is to do - your OP is very vague.
    Quote Originally Posted by no one View Post
    when installing any software on the server
    When who installs software? What software (examples)? How will they be installing it?
    is sending a message to mail a pre-specified content of the message is the program was installed on the server
    Ok (I think).

    and software is also pre-defined
    What do you mean by that?

    2. Choose a language and attempt to write this program yourself. If you have problems, you get errors or it doesn't work as expected, post the code, the errors and what you wanted it to do when asking for help.


    Edit: Alternatively if you want to employ someone to develop your program, try the Software Requests forum.
    Last edited by foobic; 03-30-2011 at 05:03 PM. Reason: Additional
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  8. #8
    Join Date
    Mar 2002
    Location
    Philadelphia, PA
    Posts
    2,508
    Confused by your question.

    You can grab the return status from any command in bash and then act on that.

    i.e
    rpm -Ivh software.rpm
    if [ $? -ne 0 ] ; then
    # then your mail action for failure.
    else
    # action successful.
    fi
    Linux junkie | steward.io

  9. #9
    Join Date
    Feb 2011
    Posts
    76
    the program language is Perl or python

    and program will install by yum instal xxx

  10. #10
    Join Date
    Jan 2011
    Location
    Ohio
    Posts
    467
    So.. Let me help you...

    I want a script written for _______.(likely CentOS) Whenever a program is installed using yum I would like a E-Mail sent to ________(E-Mail Address/User) that states the program that was installed via yum, and whether it installed successfully without errors, or if it did encounter errors I would like the E-Mail to state the errors encountered.

  11. #11
    Join Date
    Feb 2011
    Posts
    76
    I want send E-mail for installing with error or without
    O.S = Linux - CentOS

  12. #12
    Join Date
    Apr 2009
    Location
    Pittsburgh, Pennsylvania
    Posts
    582
    Quote Originally Posted by no one View Post
    I want send E-mail for installing with error or without
    O.S = Linux - CentOS
    Hello,

    Can you write what you want in your native language perhaps, and someone can use a translator to understand you a little bit better? You're not saying what you want.

  13. #13
    Join Date
    Feb 2011
    Posts
    76
    when root of server install a program by yum

    I want the server send meesage to email

    so I want script to do that

    scriot by python or perl or bash any thing that can do this object

  14. #14
    Join Date
    Apr 2009
    Location
    Pittsburgh, Pennsylvania
    Posts
    582
    Ossec can already do this. http://www.ossec.net/

  15. #15
    Join Date
    Mar 2007
    Location
    UK
    Posts
    89
    Can't logwatch already do this? I have never looked into it specifically, but am fairly sure that it is possible to configure logwatch to generate a report of everything that has been installed/uninstalled the previous day... presumably it can also be configured to report installation errors.

Similar Threads

  1. Request: Code website Layout.
    By Spitfired2s in forum Design Offers
    Replies: 3
    Last Post: 08-15-2006, 03:55 AM
  2. [REQUEST] PSD slice and code
    By twastudios in forum Design Offers
    Replies: 9
    Last Post: 06-27-2004, 11:31 PM
  3. Request : Slice and html code
    By BOYER in forum Design Offers
    Replies: 11
    Last Post: 03-24-2004, 07:22 PM
  4. small PHP code request
    By JDTurbeville in forum Programming Discussion
    Replies: 17
    Last Post: 01-29-2003, 04:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •