From cfa5792880a1eb729cb37fd90de1c273dc5c056f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 2 Mar 2010 23:11:57 +0100 Subject: change the default log file location to "@LOCALSTATEDIR@/log/tinyproxy/tinyproxy.log" i.e. add a tinyproxy subdirectory. This is meant to ease running tinyproxy as non-root user the subdirectory can be used to give the tinyproxy user write permission. Michael --- docs/man8/tinyproxy.txt.in | 2 +- etc/tinyproxy.conf.in | 2 +- src/main.c | 2 +- tests/scripts/run_tests.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/man8/tinyproxy.txt.in b/docs/man8/tinyproxy.txt.in index 9432bdc..467b1e7 100644 --- a/docs/man8/tinyproxy.txt.in +++ b/docs/man8/tinyproxy.txt.in @@ -130,7 +130,7 @@ configuration variable `StatFile`. FILES ----- -`/etc/tinyproxy/tinyproxy.conf`, `/var/run/tinyproxy.pid`, `/var/log/tinyproxy.log` +`/etc/tinyproxy/tinyproxy.conf`, `/var/run/tinyproxy.pid`, `/var/log/tinyproxy/tinyproxy.log` BUGS ---- diff --git a/etc/tinyproxy.conf.in b/etc/tinyproxy.conf.in index ab7f540..51da5a9 100644 --- a/etc/tinyproxy.conf.in +++ b/etc/tinyproxy.conf.in @@ -92,7 +92,7 @@ StatFile "@pkgdatadir@/stats.html" # and enable the Syslog directive. These directives are mutually # exclusive. # -LogFile "@localstatedir@/log/tinyproxy.log" +LogFile "@localstatedir@/log/tinyproxy/tinyproxy.log" # # Syslog: Tell tinyproxy to use syslog instead of a logfile. This diff --git a/src/main.c b/src/main.c index 1d63d92..0190db4 100644 --- a/src/main.c +++ b/src/main.c @@ -345,7 +345,7 @@ static void initialize_config_defaults (struct config_s *conf) conf->errorpages = NULL; conf->stathost = safestrdup (TINYPROXY_STATHOST); conf->idletimeout = MAX_IDLE_TIME; - conf->logf_name = safestrdup (LOCALSTATEDIR "/log/tinyproxy.log"); + conf->logf_name = safestrdup (LOCALSTATEDIR "/log/tinyproxy/tinyproxy.log"); conf->pidpath = safestrdup (LOCALSTATEDIR "/run/tinyproxy.pid"); } diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index b2cfc73..0f4134c 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -29,7 +29,7 @@ TINYPROXY_PORT=12321 TINYPROXY_USER=$USER TINYPROXY_PID_DIR=$TESTENV_DIR/var/run/tinyproxy TINYPROXY_PID_FILE=$TINYPROXY_PID_DIR/tinyproxy.pid -TINYPROXY_LOG_DIR=$LOG_DIR +TINYPROXY_LOG_DIR=$LOG_DIR/tinyproxy TINYPROXY_DATA_DIR=$TESTENV_DIR/usr/share/tinyproxy TINYPROXY_CONF_DIR=$TESTENV_DIR/etc/tinyproxy TINYPROXY_CONF_FILE=$TINYPROXY_CONF_DIR/tinyproxy.conf -- cgit v1.2.3