Skip to content
Snippets Groups Projects
Commit 6e2facbf authored by Axel Hahn's avatar Axel Hahn
Browse files

insert usage of ini.class.sh

parent f65defaf
Branches
No related tags found
1 merge request!129Db Profiles
...@@ -80,7 +80,7 @@ function dbdetect.validate(){ ...@@ -80,7 +80,7 @@ function dbdetect.validate(){
local _config="${1:-$DBD_INIFILE}" local _config="${1:-$DBD_INIFILE}"
# show errors in profile ini files # show errors in profile ini files
ini.validate "$_config" "$( dirname "$0")/includes/dbdetect_validate_profile_ini.sh" 0 && dbdetect._wd "OK: Validation of '$_config' successful" ini.validate "$_config" "$( dirname "$0")/includes/dbdetect_validate_profile.ini" 1 && dbdetect._wd "OK: Validation of '$_config' was successful"
} }
# check if the requirements for a database match # check if the requirements for a database match
......
# ----------------------------------------------------------------------
#
# VALIDATE PROFILE INI
#
# ----------------------------------------------------------------------
# IDEA
[style]
section = "^[a-zA-Z0-9_]*$"
key = "^[a-zA-Z0-9_\-]*$"
# ----------------------------------------------------------------------
# section names
#
# SYNTAX:
# comma separated list of sections
# ----------------------------------------------------------------------
[sections]
must = "detect,set"
can = ""
# ----------------------------------------------------------------------
# validate keys in sections
#
# SYNTAX:
# <section> .<key> = "<VALIDATION_TYPE>[:<VALIDATION_VALUE>]"
# VALIDATION_TYPE:
# - INTEGER
# - REGEX:<REGEX_TO_VALIDATE>
# - ONEOF:<VALUE1[,<VALUE_N>]>
# ----------------------------------------------------------------------
[varsMust]
; detect.tcp-port = "INTEGER"
[varsCan]
detect.binary = "REGEX:.*"
detect.process =
detect.tcp-port = "INTEGER"
detect.tcp-target = "REGEX:.*"
detect.tcp-process =
detect.type = "ONEOF:sqlite"
detect.file[] =
set.su =
set.dbuser =
set.dbpassword =
set.env =
set.params =
# ----------------------------------------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment