app-crypt/tang: add conf.d config file

Signed-off-by: Julien Roy <julien@jroy.ca>
This commit is contained in:
Julien Roy
2022-07-08 21:58:22 -04:00
parent aba52de8a6
commit 14b4341633
3 changed files with 11 additions and 6 deletions

View File

@@ -0,0 +1,8 @@
# Address for tang to listen to (default: 0.0.0.0)
ADDRESS=0.0.0.0
# Port for tang to listen to (default: 8888)
PORT=8888
# Directory where keys will be stored (default: /var/db/tang)
TANGDIR=/var/db/tang

View File

@@ -2,15 +2,10 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
port=8888
bind=0.0.0.0
tangd=/usr/libexec/tangd
tangdir=/var/db/tang
name="tang daemon"
description="Tang binding daemon"
command=/usr/bin/socat
pidfile="/var/run/${RC_SVCNAME}.pid"
command_user="tang"
command_args="TCP-LISTEN:${port},bind=${bind},fork SYSTEM:'${tangd} ${tangdir}'"
command_args="TCP-LISTEN:${PORT},bind=${ADDRESS},fork SYSTEM:'/usr/libexec/tangd ${TANGDIR}'"
command_background=true

View File

@@ -26,6 +26,8 @@ src_install(){
newinitd "${FILESDIR}"/tangd.initd tangd
systemd_dounit ${FILESDIR}/tangd.service
doconfd "${FILESDIR}"/tangd
dodir /var/db/tang
keepdir /var/db/tang
fowners tang:tang /var/db/tang