tordam

A library for peer discovery inside the Tor network
git clone https://git.parazyd.org/tordam
Log | Files | Refs | README | LICENSE

commit 2a5a931d4efd054b724d67bcb00980f921927093
parent 81c0995b7351efe895b5d1e78a1083861cd9cbaa
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 21 Mar 2018 16:33:51 +0100

Add proper permission handling to initscript logs.

Diffstat:
Mcontrib/dam-client.conf | 2+-
Mcontrib/dam-client.init | 2++
Mcontrib/dam-dir.conf | 2+-
Mcontrib/dam-dir.init | 2++
4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/contrib/dam-client.conf b/contrib/dam-client.conf @@ -7,4 +7,4 @@ damuid="decode" damgid="decode" # Path to logfile -damlog="/var/log/dam-client.log" +damlog="/var/log/tor-dam/dam-client.log" diff --git a/contrib/dam-client.init b/contrib/dam-client.init @@ -14,6 +14,8 @@ depend() { start() { ebegin "Starting $description" _h="$(getent passwd $damuid | cut -d: -f6)" + mkdir -p $(dirname $damlog) + chown $damuid:$damgid $(dirname $damlog) supervise-daemon -d $_h -e HOME=$_h -u $damuid -g $damgid \ --pidfile $pidfile -1 $damlog -2 $damlog \ --start $command diff --git a/contrib/dam-dir.conf b/contrib/dam-dir.conf @@ -7,4 +7,4 @@ damuid="decode" damgid="decode" # Path to logfile -damlog="/var/log/dam-dir.log" +damlog="/var/log/tor-dam/dam-dir.log" diff --git a/contrib/dam-dir.init b/contrib/dam-dir.init @@ -15,6 +15,8 @@ depend() { start() { ebegin "Starting $description" _h="$(getent passwd $damuid | cut -d: -f6)" + mkdir -p $(dirname $damlog) + chown $damuid:$damgid $(dirname $damlog) supervise-daemon -d $_h -e HOME=$_h -u $damuid -g $damgid \ --pidfile $pidfile -1 $damlog -2 $damlog \ --start $command