Database of pfsense
-
hello everyone
I am working on the pf sense. But I am not able to find the data base directory of all the database files????
please inform me if anyone knows where all the database files are located in pfsense
-
All the settings are saved in /cf/conf/config.xml
The system reads from that and sets up the interfaces in FreeBSD and makes the rules config file for pf and any needed conf files for other daemons (DHCP server, DNS etc.) and starts them all.
-
sorry
I think you didn't get my question.
My question is that that if we are studying the captiveportal.inc file whose location is the /etc/inc/captiveportal.inc
in this file the the different .db files are called and usedCan anyone let me know where are those all .db files are located
-
So huh, if you are studying that file it's already written there, so what's your trouble?
$ grep \\.db /etc/inc/captiveportal.inc unlink_if_exists("{$g['vardb_path']}/captiveportal{$cpzone}.db"); unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); unlink_if_exists("{$g['vardb_path']}/captiveportal{$cpzone}.db"); unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); $fd = @fopen("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db", "w"); if (file_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db")) { $cpradiusdb = file("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db", $db_path = "{$g['vardb_path']}/captiveportal{$cpzone}.db"; if (file_exists("{$g['vardb_path']}/captiveportal_usedmacs_{$cpzone}.db")) { $usedmacs = file("{$g['vardb_path']}/captiveportal_usedmacs_{$cpzone}.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); @file_put_contents("{$g['vardb_path']}/captiveportal_usedmacs_{$cpzone}.db", implode("\n", $usedmacs));
-
i know all this but i want the location of all this highlighed files
-
So you need to know the value of:
$g['vardb_path']
Look in /etc/inc/globals.inc
"vardb_path" => "/var/db"
find and grep are your friend, use them.
-
Wondering what kind of work is this for. You'd better keep a good backup. ::)