iPrint Notification Script

iPrint Notification Script

The iPrint Notification Script will allow you to identify when both the Driver Store and Print Manager go down on a server. It will notify you either by text message or email. The script will also attempt to restart the print services to get it operational.

Installation Instructions:



Note: The iPrint Notification Script works with both OES2 and OES11.


  1. Download iprintnotify.tgz


  2. Open a Terminal window and type “su”.


  3. Enter root’s password.


  4. Extract the script from the tarball.

    #tar –xzvf iprintnotify.tgz


  5. Make the script executable.

    #chmod 755 iPrintNotify.sh


  6. Edit one or more of the following variables at the top of the iPrintNotify.sh script

  7. Example: EMAIL_ADDRESS="joe@mycompany.com"
    EMAIL_ADDRESS=""

    Example: TEXT_ADDRESS="8011231234@txt.att.net"
    TEXT_ADDRESS=""

    #If there is a Driver Store running on this server, then the setting should be "YES" otherwise put "NO"
    Example: LOCAL_DRIVER_STORE="NO"
    LOCAL_DRIVER_STORE="YES"

    #If there is a print manager running on this server, then the setting should be "YES" otherwise put "NO"
    Example: LOCAL_PRINT_MANAGER="NO"
    LOCAL_PRINT_MANAGER="YES"

    LOGFILE="/tmp/iPrintNotify.log"



  8. Run the iPrint Notification Script now or setup a cronjob to run the script.

    #./iPrintNotify.sh -c



Setup Instructions for crontab:





  1. SSH or telnet into the root account.

  2. At the prompt, type in 'crontab -e'. This will open up your crontab file, or create a new one if it doesn't exist.


  3. When this file opens, you will see other cron jobs listed in here, or if you haven't any - you'll see a bunch of lines with '~' on them.
  4. Use the cursor to go down until you can't move the cursor down any more. This is where you start your new line. Press 'o' to insert a new line.

  5. Press 'o' to insert a new line. If you want to edit a line, press 'i'.

  6. Create a crontab entry that fits your needs and enter at this time.


  7. Here are some examples:


    Set to run every minute of every hour of every day

    * * * * * /[Location of Script]/iPrintNotify.sh > /dev/null


    Set to run every five minutes of every hour of every day

    */5 * * * * /[Location of Script]/iPrintNotify.sh > /dev/null


    Set to run every 30 minutes of every hour of every day

    */30 * * * * /[Location of Script]/iPrintNotify.sh > /dev/null


  8. Press the 'esc' key to exit out of edit mode.

  9. To save the changes and exit, type the following in: :wq


  10. If you want to exit without saving changes, type in: :q!
  11. Once you have exited, to view the new entry in your crontab file type crontab -l in at the prompt. This will list the contents of your crontab file.


Labels (2)
Attachments

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
10 of 10
Last update:
‎2020-01-21 21:42
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.