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

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

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant