Browse files

o Have a default refresh time of 10 seconds.

o Give a tip how to use wget to switch configurations.
  • Loading branch information...
1 parent abb0c42 commit 436f57d87e1fb54fccf61c4233b377e0d896367e @hzeller committed Sep 22, 2012
Showing with 17 additions and 4 deletions.
  1. +12 −1 README.md
  2. +5 −3 folve-main.cc
View
13 README.md
@@ -102,7 +102,8 @@ The files are searched from the most specific to the least specific type.
You can supply this option multiple times:
you'll get a drop-down select on the HTTP status page.
-p <port> : Port to run the HTTP status server on.
- -r <refresh> : If > 0: seconds between refresh of status page.
+ -r <refresh> : Seconds between refresh of status page.
+ Default is 10. Switch off with -1
-g : Gapless convolving alphabetically adjacent files.
-D : Moderate volume Folve debug messages to syslog.
Can then also be toggled in the UI.
@@ -123,3 +124,13 @@ status information on a http server; e.g. With `./folve ... -p 17322`
have a look on
http://localhost:17322/
+
+To manually switch the configuration in use from the command line,
+you can use wget
+
+ wget -q -O/dev/null http://localhost:17322/settings?f=2
+
+The parameter given to `f=` is the configuration in the same sequence you
+supplied on startup, starting to count from 1. Configuration 0 means
+'no filter' (And no, there is no security built in. If you want people from
+messing with the configuration of your folve-daemon, don't use -p).
View
8 folve-main.cc
@@ -36,7 +36,7 @@
// Compilation unit variables to communicate with the fuse callbacks.
static struct FolveRuntime {
FolveRuntime() : fs(NULL), mount_point(NULL),
- status_port(-1), refresh_time(-1) {}
+ status_port(-1), refresh_time(10) {}
FolveFilesystem *fs;
const char *mount_point;
int status_port;
@@ -191,13 +191,15 @@ static int usage(const char *prg) {
"\t you'll get a drop-down select on the HTTP "
"status page.\n"
"\t-p <port> : Port to run the HTTP status server on.\n"
- "\t-r <refresh> : If > 0: seconds between refresh of status page.\n"
+ "\t-r <refresh> : Seconds between refresh of status page;\n"
+ "\t Default is %d seconds; switch off with -1.\n"
"\t-g : Gapless convolving alphabetically adjacent files.\n"
"\t-D : Moderate volume Folve debug messages to syslog.\n"
"\t Can then also be toggled in the UI.\n"
"\t-f : Operate in foreground; useful for debugging.\n"
"\t-o <mnt-opt> : other generic mount parameters passed to fuse.\n"
- "\t-d : High volume fuse debug log. Implies -f.\n");
+ "\t-d : High volume fuse debug log. Implies -f.\n",
+ folve_rt.refresh_time);
return 1;
}

0 comments on commit 436f57d

Please sign in to comment.