Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

/usr/local/bin/pulledpork_update.sh should check whether it's running interactively or from cron #127

@GoogleCodeExporter

Description

@GoogleCodeExporter
When running /usr/local/bin/pulledpork_update.sh on a slave sensor (gets its 
rules from a master instead of directly from the Internet), the script waits 5 
minutes for the master to complete its download from the Internet.  This is 
great for running from a cronjob, but not so great if you're running it 
interactively and are trying to get a new ruleset deployed as quickly as 
possible.

Change this:

echo "Sleeping for 5 minutes to allow master time to download new rules."
sleep 5m 

to this:

# Determine if we are running interactively or from cron
        tty -s
        if [ $? -gt 0 ]
        then
                echo "Sleeping for 5 minutes to allow master time to download new rules."
                sleep 5m 
        fi

Original issue reported on code.google.com by doug.bu...@gmail.com on 2 Oct 2011 at 2:45

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions