From faa1468cc1509053a0b569139888ad8679598af3 Mon Sep 17 00:00:00 2001 From: gueux Date: Fri, 31 Jul 2015 10:59:02 +0000 Subject: --- doc/forum/parsing_a_config_file.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/forum/parsing_a_config_file.mdwn (limited to 'doc') diff --git a/doc/forum/parsing_a_config_file.mdwn b/doc/forum/parsing_a_config_file.mdwn new file mode 100644 index 00000000..cbf0952a --- /dev/null +++ b/doc/forum/parsing_a_config_file.mdwn @@ -0,0 +1,11 @@ +I have an issue with how parsing a tor config file. Hidden services are defined like this: first you specify a dir with "HiddenServiceDir" and then, (on the following lines) you define the port mappings with one or more "HiddenServicePort". You can have multiple hidden services defined in the same tor config file. + + HiddenServiceDir /var/lib/tor/myhttponion + HiddenServicePort 80 127.0.0.1:80 + HiddenServicePort 8080 127.0.0.1:8080 + HiddenServiceDir /var/lib/tor/myirconion + HiddenServicePort 6667 127.0.0.1:6667 + +I used "configured" to define "hiddenService" in "Propellor.Property.Tor", but I didn't realized that there can be multiple hidden services, each with multiple ports. So, defining multiple hiddenService properties does not work as expected ("Propellor.Property.Tor.configured" assumes there is only one line for one config variable)... + +A kind of general file parsing functions on multilines (based on AST?) may be a nice addition to Propellor.Property.File, but it sounds too hard for my skills :-). Maybe someone would have an idea to solve this problem? -- cgit v1.2.3