From e87c856487d4b01dfb149fe70c8df79b539e7d3a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 2 Mar 2010 23:36:59 +0100 Subject: change the default pid file location to "@LOCALSTATEDIR@/run/tinyproxy/tinyproxy.pid" 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 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/man8/tinyproxy.txt.in b/docs/man8/tinyproxy.txt.in index 467b1e7..24c5e30 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/tinyproxy.log` +`/etc/tinyproxy/tinyproxy.conf`, `/var/run/tinyproxy/tinyproxy.pid`, `/var/log/tinyproxy/tinyproxy.log` BUGS ---- diff --git a/etc/tinyproxy.conf.in b/etc/tinyproxy.conf.in index 51da5a9..e1cc838 100644 --- a/etc/tinyproxy.conf.in +++ b/etc/tinyproxy.conf.in @@ -122,7 +122,7 @@ LogLevel Info # PidFile: Write the PID of the main tinyproxy thread to this file so it # can be used for signalling purposes. # -PidFile "@localstatedir@/run/tinyproxy.pid" +PidFile "@localstatedir@/run/tinyproxy/tinyproxy.pid" # # XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which diff --git a/src/main.c b/src/main.c index 0190db4..481c311 100644 --- a/src/main.c +++ b/src/main.c @@ -346,7 +346,7 @@ static void initialize_config_defaults (struct config_s *conf) conf->stathost = safestrdup (TINYPROXY_STATHOST); conf->idletimeout = MAX_IDLE_TIME; conf->logf_name = safestrdup (LOCALSTATEDIR "/log/tinyproxy/tinyproxy.log"); - conf->pidpath = safestrdup (LOCALSTATEDIR "/run/tinyproxy.pid"); + conf->pidpath = safestrdup (LOCALSTATEDIR "/run/tinyproxy/tinyproxy.pid"); } /** -- cgit v1.2.3