tor-dam

tor distributed announce mechanism (not a dht)
git clone https://git.parazyd.org/tor-dam
Log | Files | Refs | README | LICENSE

commit 82b2dac5c8351b1680dfb1a2ec615a4e062a48fc
parent 1bcaf450d010e5b8356d06116abeb7e9789c4ff0
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 19 Feb 2018 13:28:44 +0100

Add openrc initscripts

Diffstat:
Acontrib/dam-client.conf | 10++++++++++
Acontrib/dam-client.init | 18++++++++++++++++++
Acontrib/dam-dir.conf | 10++++++++++
Acontrib/dam-dir.init | 19+++++++++++++++++++
4 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/contrib/dam-client.conf b/contrib/dam-client.conf @@ -0,0 +1,10 @@ +# /etc/conf.d/dam-client + +# User to run as +damuid="decode" + +# Group to run as +damgid="decode" + +# Path to logfile +damlog="/var/log/dam-client.log" diff --git a/contrib/dam-client.init b/contrib/dam-client.init @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/home/$damuid/go/bin/dam-client" +pidfile="/var/run/dam-client.pid" + +description="Tor DAM client" + +depend() { + after tor dam-dir +} + +start() { + start-stop-daemon --start --background -u $damuid -g $damgid \ + --make-pidfile --pidfile $pidfile \ + --startas /bin/sh -- -c "exec $command >> $damlog 2>&1" +} diff --git a/contrib/dam-dir.conf b/contrib/dam-dir.conf @@ -0,0 +1,10 @@ +# /etc/conf.d/dam-dir + +# User to run as +damuid="decode" + +# Group to run as +damgid="decode" + +# Path to logfile +damlog="/var/log/dam-client.log" diff --git a/contrib/dam-dir.init b/contrib/dam-dir.init @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/home/$damuid/go/bin/dam-dir" +pidfile="/var/run/dam-dir.pid" + +description="Tor DAM server" + +depend() { + after logger + before tor dam-client +} + +start() { + start-stop-daemon --start --background -u $damuid -g $damgid \ + --make-pidfile --pidfile $pidfile \ + --startas /bin/sh -- -c "exec $command >> $damlog 2>&1" +}