Commit Graph

3566 Commits

Author SHA1 Message Date
Digimer
f93f8a10e5 * Fixed the scancore-daemon.service unit file.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-10 02:54:28 -04:00
Digimer
753d7a3ba6 * Created the new System.pm module with the initial read_file() method that reads files.
* Created Log->language that sets/returns the active log language.
* Created Log->variables that takes a hash reference and logs their variable: [$value] pairs.
* Created the new /usr/sbin/striker/ directory which is added to the list of search directories. We will store our tools here.
* Created the scancore-daemon and scancore-daemon.unit files which will handle all the things we used to use crontab for, minus ScanCore itself.
* Created the scancore-update-states that will eventually store some machine state information in a file that the web browser can read.
* Created the cgi-bin/home script that will be the main landing page for the Striker UI.
* Added some of the initial html files.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-10 02:38:04 -04:00
Digimer
e49d5285c0 * Added the AN/test.conf file needed for Tools.t and added testing for the new Get, Log and Validate methods (save for Get->switches or Log->entry as I am not sure how to test them yet).
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-09 14:52:56 -04:00
Digimer
0ee84cd31e * Created the new Templates module to handle reading and preparing templates.
* Added an index.html and favicon as well as a very basic 'home' cgi script which will allow the web development to start.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-09 04:29:25 -04:00
Digimer
b571fa043e * Created Validate.pm and created Validate->is_uuid for validating UUID strings.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-08 01:30:28 +09:00
Digimer
0a712f4a9c * Added Get->switches to read in command line switches.
* Added Get->host_uuid that reads the host's UUID from dmidecode.
* Added Log->_adjust_log_level to automatically change the active log level when -V (0), -v (1), -vv (2), -vvv (3) or -vvvv (4) are passed.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-08 01:15:03 +09:00
Digimer
421d970f22 * Added the new 'tools.conf' which can be used to override AN::Tools default values.
* Got Log->entry() working now. Decided to use journald logging exclusively... They've thought a lot more about logging than we will, and the idea that there are special facilities for sensitive log entries and the ability to perform remote logging was too appealing.
* Created Log->level() to set/check the currently active log level.
* Created Log->secure() to set/check whether sensitive log entries will be recorded.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-08 00:36:06 +09:00
Digimer
dd4fb49e6c * Added the new AN::Log and AN::Get modules.
* Added Get->date_and_time() method.
* Added the 'initialize' parameter to Storage->search_directories() to have a cleaner way of initializing the search directories.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-05 21:02:14 +09:00
Digimer
7b8cb22de0 * Fixed the initial call to Storage->search_directories() in AN::Tools->new() to properly prep the search directory list.
* Added tests for the new Words->string() method.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-05 11:48:13 +09:00
Digimer
a844136c3b * Added the new Words->string() method to insert variables, data and other strings into the requested 'key'. This is a condensed and cleaned up version of v2's String->get() method.
* Added the new $an->_get_hash_reference() method that takes a key in the format "foo::bar" and returns the contents of $an->data->{foo}{bar}.
* Added the new Words->clean_spaces() method that removes leading and trailing spaces from a string, and condenses multiple spaces into single ones to simplify string parsing.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-04 13:40:17 +09:00
Digimer
dab7b17517 * Fixed the double-encoding messages when using XML::Simple to read in words files. Our use for XML is simple, so despite XML::Simple being discouraged, it suits our needs well.
* Created tests for most existing module methods now.
* Updated Storage->search_directories to handle merging @INC and $ENV{'PATH'} when called with an invalid directories parameter, and exploited this behaviour to initially set the directory search list. This also deprecated the Tools->_add_environment_path_to_search_directories() method.
* Added Storage->read_config based on the old v2 'Storage->read_conf()'. Also ported over the old Tools->_add_hash_reference() and Tools->_make_hash_reference() methods to assist with this method's operation.
* Created Words->key() that returns the raw string for a given language and key.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-05-27 14:23:34 +09:00
Digimer
ec307bc019 * Working on a new way of handling words files.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-05-10 15:01:36 -04:00
Digimer
4ac37e239f * Added the new AN::Tools::Storage and ::Alert modules (basic as they are at this point)..
* Created AN/Tools.t for testing.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-05-02 00:41:12 -04:00
Digimer
8605007af9 * Added the initial AN::Tools perl module. It is exceedingly basic at this stage.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-04-13 17:04:03 -04:00
Digimer
a59ffe40e1 Updated the README to be somewhat more descriptive.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-04-12 23:49:35 -04:00
Digimer
7978a83bca first commit 2017-04-12 23:46:49 -04:00