dot

packages and services management
Log | Files | Refs | README

commit 30de74b1b57ceb508e569b816976bdcc4f3fd861
parent d47a394bab5a8c01d9c9b20d1a0cf133b5be1f8a
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 23 Nov 2018 01:15:22 +0100

s6/vtund: service-enable vtund client <domain> <host-to-connect-to>

Spawn daemon according to host to connect to instead of current host.

Diffstat:
As6/vtund/glaphyrae/env/SESSION | 1+
Ms6/vtund/josuah.net/conf/glaphyrae/up/program | 2+-
Ms6/vtund/x/setup | 9++++-----
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/s6/vtund/glaphyrae/env/SESSION b/s6/vtund/glaphyrae/env/SESSION @@ -0,0 +1 @@ +glaphyrae diff --git a/s6/vtund/josuah.net/conf/glaphyrae/up/program b/s6/vtund/josuah.net/conf/glaphyrae/up/program @@ -1 +1 @@ -/bin/true +"/bin/true" diff --git a/s6/vtund/x/setup b/s6/vtund/x/setup @@ -1,10 +1,9 @@ #!/usr/bin/env execlineb -if { mkdir -p env } -if { redirfd -w 1 env/SESSION uname -n } - -if { mkdir -p conf/session } -if { redirfd -w 1 conf/session/passwd pass vtun } +if { + redirfd -r 0 env/SESSION withstdinas x importas -n session x + redirfd -w 1 conf/${session}/passwd pass vtund/$session +} if { mkdir -p data } redirfd -w 1 data/conf cd conf