zhengweisk / aspersa

Automatically exported from code.google.com/p/aspersa
0 stars 0 forks source link

Make stalk read a config file #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Make stalk read a configuration file so you can upgrade it easily without 
losing your settings.  Probably the easiest thing to do is just source a file:

if [ -r $0.conf ]; then
   . $0.conf
fi

Original issue reported on code.google.com by baron.schwartz on 14 Feb 2011 at 4:32

GoogleCodeExporter commented 9 years ago
Fixed in revision 349

If fixed this as suggested.  Stalk now checks if "$0.conf" exists, and if it 
does, it sources it.

I had to change the default initialization for the rest of the parameters so 
that only a partial subset of configuration options can be set in the config 
file.

If you don't specify THRESHOLD, INTERVAL or VARIABLE in the config file, they 
will be still be read from $0, $1, $2 respectively.

For the other variables, they will be set to the defaults if you don't specify 
them in the config file.

Original comment by greenlion@gmail.com on 19 Feb 2011 at 2:41

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r353.

Fix a few typos in stalk.  Also remove the functionality of accepting 
command-line options, because that was never really used, and update the 
documentation.

Original comment by baron.schwartz on 19 Feb 2011 at 9:23