added: program reads its configuration from a config file
added: confparser directory and confparser.h and confparser.cpp
class ConfParser used to parse a config file
this is a generic parser, can be used by another project
added: config.h, config.cpp
class Config used for assigning values from
a config file into the data object
added: function for signals: SIGINT, SIGHUP
after receiving SIGHUP the program will read
its config file again
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@463 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -13,34 +13,11 @@
|
||||
|
||||
Data::Data()
|
||||
{
|
||||
// all these data will be reading from a config file
|
||||
signal_hup = false;
|
||||
stdout_is_closed = false;
|
||||
|
||||
log_file = "cmslu.log";
|
||||
fcgi_socket = "/var/cmslu/s1";
|
||||
fcgi_socket_chmod = 0770;
|
||||
fcgi_socket_user = "tomek";
|
||||
fcgi_socket_group = "www";
|
||||
|
||||
log_level = 2;
|
||||
log_stdout = true;
|
||||
|
||||
templates = "../httpd/templates"; // templates dir
|
||||
default_index = "index.html";
|
||||
http_session_id_name = "slimaczek_sid";
|
||||
db_database = "tomek";
|
||||
db_user = "tomek";
|
||||
db_pass = "monitorekasd";
|
||||
|
||||
// !! add a method which will be adding a slash at the end of url-es
|
||||
base_url = "http://s10.slimaczek.pl/"; // with a slash at the end
|
||||
|
||||
one_item_is_showed = true;
|
||||
|
||||
dir.root.default_item = 134;
|
||||
// the rest will be read from a config file
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user