tAdd proper permission handling to initscript logs. - tordam - A library for peer discovery inside the Tor network (HTM) git clone https://git.parazyd.org/tordam (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 2a5a931d4efd054b724d67bcb00980f921927093 (DIR) parent 81c0995b7351efe895b5d1e78a1083861cd9cbaa (HTM) Author: parazyd <parazyd@dyne.org> Date: Wed, 21 Mar 2018 16:33:51 +0100 Add proper permission handling to initscript logs. Diffstat: M contrib/dam-client.conf | 2 +- M contrib/dam-client.init | 2 ++ M contrib/dam-dir.conf | 2 +- M contrib/dam-dir.init | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) --- (DIR) diff --git a/contrib/dam-client.conf b/contrib/dam-client.conf t@@ -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" (DIR) diff --git a/contrib/dam-client.init b/contrib/dam-client.init t@@ -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 (DIR) diff --git a/contrib/dam-dir.conf b/contrib/dam-dir.conf t@@ -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" (DIR) diff --git a/contrib/dam-dir.init b/contrib/dam-dir.init t@@ -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