From 0e931059d5cf44828b0b1dd29a9102618d0ce2a1 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 15 Dec 2014 10:51:28 -0500 Subject: Misc fixes to ntopng. Explicitly set data dir, it used to default to /etc/dump.rdb, now defaults to cwd which is bad. Fix path given to ldconfig, contained a bad reference to i386 that should have been dynamic. Bump redis to save after setting password to ensure the db file is flushed to disk. --- config/ntopng/ntopng.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'config/ntopng/ntopng.xml') diff --git a/config/ntopng/ntopng.xml b/config/ntopng/ntopng.xml index 5428d205..45b68bdc 100644 --- a/config/ntopng/ntopng.xml +++ b/config/ntopng/ntopng.xml @@ -182,8 +182,8 @@ $redis_path = "/usr/pbi/ntopng-" . php_uname("m") . "/bin"; } - $start = "ldconfig -m /usr/pbi/ntopng-i386/lib\n"; - $start .= "\t{$redis_path}/redis-server &\n"; + $start = "ldconfig -m /usr/pbi/ntopng-" . php_uname("m") . "/lib\n"; + $start .= "\t{$redis_path}/redis-server --dir /var/db/ntopng/ --dbfilename ntopng.rdb &\n"; // TODO: // Add support for --data-dir /somewhere, --httpdocs-dir /somewhereelse, // --dump-timeline (on/off) --http-port, --https-port @@ -207,6 +207,7 @@ $ntopng_config['password'] = "admin"; $password = md5($ntopng_config['password']); mwexec_bg("{$redis_path}/redis-cli SET user.admin.password " . escapeshellarg($password)); + mwexec_bg("{$redis_path}/redis-cli save"); conf_mount_ro(); config_unlock(); } -- cgit v1.2.3