Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change config file format #78

Closed
GoogleCodeExporter opened this issue Mar 24, 2015 · 4 comments
Closed

Change config file format #78

GoogleCodeExporter opened this issue Mar 24, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

PATTERN="$hello*"
FILENAME=hello.txt
OUTPUT=result.txt

source config.ini

Reference:
http://linux.byexamples.com/archives/553/config-file-for-your-bash-script

Original issue reported on code.google.com by doug.bu...@gmail.com on 21 Jan 2011 at 6:42

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

Made first cut at this change.  Final fix will be to update Setup script to use 
new format.

Original comment by doug.bu...@gmail.com on 24 Jul 2011 at 9:06

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

Security Onion 20110914
/usr/local/bin/setup line 366 updated to new config file format

Original comment by doug.bu...@gmail.com on 14 Sep 2011 at 7:37

  • Changed state: Verified
  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

Updated security-onion-upgrade.sh with the following:

sed -i 's| |=|g' $CONF
source $CONF
if [ "$VERSION" = "20110913" ]; then
        NEW="20110914"
        echo "**********************************************"   | $LOGGER
        echo "* Upgrading from $VERSION to $NEW."               | $LOGGER
        echo "**********************************************"   | $LOGGER
        DIR="/nsm/backup/$NEW"
        mkdir -p $DIR                                           | $LOGGER
        cd $DIR

        echo "* Backing up /usr/local/bin/setup"                | $LOGGER
        cp /usr/local/bin/setup $DIR/                           | $LOGGER

        echo "* Updating /usr/local/bin/setup" | $LOGGER
        FILE='securityonion-setup_20110914_i386.deb'
        wget -q http://sourceforge.net/projects/security-onion/files/$NEW/$FILE -O $FILE | $LOGGER
        dpkg -i $FILE                                           | $LOGGER

        echo "* Installing sguil-db-purge" | $LOGGER
        FILE='securityonion-sguil-db-purge_20110914_i386.deb'
        wget -q http://sourceforge.net/projects/security-onion/files/$NEW/$FILE -O $FILE | $LOGGER
        dpkg -i $FILE                                           | $LOGGER

        echo "* Backing up $CONF"                               | $LOGGER
        cp $CONF $DIR/                                          | $LOGGER

        echo "* Adding DAYSTOKEEP variable to $CONF"            | $LOGGER
        echo "DAYSTOKEEP=365" >> $CONF

        echo "* PLEASE NOTE!"
        echo "* sguil-db-purge is now installed and is schedule to run"
        echo "* every day at 5:01 AM.  It will do the following:"
        echo "  - stop sguild"
        echo "  - purge old events from the database"
        echo "  - repair the remaining MySQL tables"
        echo "  - start sguild"
        echo "* The default retention policy for the purge is 365 days."
        echo "* If you would like to change this value, please change"
        echo "* the DAYSTOKEEP variable in /etc/nsm/securityonion.conf."

        sed -i "s|VERSION=$VERSION|VERSION=$NEW|g" $CONF        | $LOGGER
        echo "* Upgrade to $NEW complete."                      | $LOGGER
        echo 
fi

Original comment by doug.bu...@gmail.com on 14 Sep 2011 at 7:42

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 24, 2015

Published:
http://securityonion.blogspot.com/2011/09/security-onion-20110914-now-available.
html

Original comment by doug.bu...@gmail.com on 15 Sep 2011 at 11:01

  • Added labels: ****
  • Removed labels: ****
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.