Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ tinyproxy::error_files: null
tinyproxy::default_error_file: "/usr/share/tinyproxy/default.html"
tinyproxy::stat_host: null
tinyproxy::stat_file: "/usr/share/tinyproxy/stats.html"
tinyproxy::log_file: "/var/log/tinyproxy/tinyproxy.log"
tinyproxy::use_syslog: false
tinyproxy::log_file: null
tinyproxy::use_syslog: null
tinyproxy::pid_file: "/var/run/tinyproxy/tinyproxy.pid"
tinyproxy::use_xtinyproxy: false
tinyproxy::default_upstreams: null
Expand Down
4 changes: 2 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Optional[String] $stat_host,
String $stat_file,
Optional[String] $log_file,
Boolean $use_syslog,
Optional[Boolean] $use_syslog,
String $pid_file,
Boolean $use_xtinyproxy,
Optional[Array[String]] $default_upstreams,
Expand Down Expand Up @@ -44,7 +44,7 @@
){

if $log_file != undef and $use_syslog == true {
fail('$use_syslog and $log_logfile are mutually exclusive.')
fail('$use_syslog and $log_file are mutually exclusive.')
}

file { $config_path:
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Optional[String] $stat_host,
String $stat_file,
Optional[String] $log_file,
Boolean $use_syslog,
Optional[Boolean] $use_syslog,
String $pid_file,
Boolean $use_xtinyproxy,
Optional[Array[String]] $default_upstreams,
Expand Down
10 changes: 7 additions & 3 deletions templates/tinyproxy.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ StatFile "<%= @stat_file %>"
# and enable the Syslog directive. These directives are mutually
# exclusive.
#
<%- if @log_file -%>
<%- if @log_file.nil? and ( @use_syslog.nil? or ! @use_syslog ) -%>
LogFile "/var/log/tinyproxy/tinyproxy.log"
<%- elsif @use_syslog -%>
# LogFile "/var/log/tinyproxy/tinyproxy.log"
<%- else -%>
LogFile "<%= @log_file %>"
<%- end -%>

Expand All @@ -123,10 +127,10 @@ LogFile "<%= @log_file %>"
# option must not be enabled if the Logfile directive is being used.
# These two directives are mutually exclusive.
#
<%- if @syslog.nil? -%>
<%- if @use_syslog.nil? -%>
#Syslog On
<%- else -%>
Syslog <%= @syslog ? 'On' : 'Off' %>
Syslog <%= @use_syslog ? 'On' : 'Off' %>
<%- end -%>

#
Expand Down