dot

packages and services management
Log | Files | Refs | README

commit 3c48da5ab78e570ccdd48d502219b45101495e11
parent e27ee9bdc7068d570d5f60b4421984b90fbb6dc2
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 27 Mar 2018 11:55:35 +0200

hold configuration as files and directories

Diffstat:
Arunit/authsrv9/.gitignore | 1+
Arunit/authsrv9/auth/authdom | 2++
Arunit/authsrv9/auth/authid | 2++
Arunit/authsrv9/auth/badusers | 2++
Arunit/authsrv9/auth/users/bootes/expire | 2++
Arunit/authsrv9/auth/users/bootes/status | 2++
Arunit/authsrv9/auth/users/josuah/expire | 2++
Arunit/authsrv9/auth/users/josuah/status | 2++
Arunit/authsrv9/auth/users/sys/expire | 2++
Arunit/authsrv9/auth/users/sys/status | 2++
Arunit/authsrv9/bin/tcpserver | 0
Arunit/authsrv9/pass | 6++++++
Mrunit/authsrv9/run | 39++++++---------------------------------
Arunit/u9fs/.gitignore | 1+
14 files changed, 32 insertions(+), 33 deletions(-)

diff --git a/runit/authsrv9/.gitignore b/runit/authsrv9/.gitignore @@ -0,0 +1 @@ +auth/users/*/key diff --git a/runit/authsrv9/auth/authdom b/runit/authsrv9/auth/authdom @@ -0,0 +1 @@ +local+ \ No newline at end of file diff --git a/runit/authsrv9/auth/authid b/runit/authsrv9/auth/authid @@ -0,0 +1 @@ +bootes+ \ No newline at end of file diff --git a/runit/authsrv9/auth/badusers b/runit/authsrv9/auth/badusers @@ -0,0 +1 @@ +adm+ \ No newline at end of file diff --git a/runit/authsrv9/auth/users/bootes/expire b/runit/authsrv9/auth/users/bootes/expire @@ -0,0 +1 @@ +never+ \ No newline at end of file diff --git a/runit/authsrv9/auth/users/bootes/status b/runit/authsrv9/auth/users/bootes/status @@ -0,0 +1 @@ +ok+ \ No newline at end of file diff --git a/runit/authsrv9/auth/users/josuah/expire b/runit/authsrv9/auth/users/josuah/expire @@ -0,0 +1 @@ +never+ \ No newline at end of file diff --git a/runit/authsrv9/auth/users/josuah/status b/runit/authsrv9/auth/users/josuah/status @@ -0,0 +1 @@ +ok+ \ No newline at end of file diff --git a/runit/authsrv9/auth/users/sys/expire b/runit/authsrv9/auth/users/sys/expire @@ -0,0 +1 @@ +never+ \ No newline at end of file diff --git a/runit/authsrv9/auth/users/sys/status b/runit/authsrv9/auth/users/sys/status @@ -0,0 +1 @@ +ok+ \ No newline at end of file diff --git a/runit/authsrv9/bin/tcpserver b/runit/authsrv9/bin/tcpserver Binary files differ. diff --git a/runit/authsrv9/pass b/runit/authsrv9/pass @@ -0,0 +1,6 @@ +#!/bin/sh -ex + +for u in josuah bootes sys +do + [ -f "auth/users/$u/key" ] || passtokey >"auth/users/$u/key" +done diff --git a/runit/authsrv9/run b/runit/authsrv9/run @@ -11,45 +11,18 @@ # https://www.ueber.net/who/mjl/plan9/plan9-obsd.html port="567" -user="josuah" exec 2>&1 mkdir -p dev # for /dev/log, for syslog mkdir -p bin # for the binary - -mkdir -p auth # holding all configuration files -printf 'bootes' >auth/authid -printf 'local' >auth/authdom -printf 'adm' >auth/badusers - -mkdir -p auth/users # holding info about users - -mkdir -p auth/users/bootes -[ -f auth/users/sys/key ] || -passtokey >auth/users/bootes/key -printf 'ok' >auth/users/bootes/status -printf 'never' >auth/users/bootes/expire - -mkdir -p auth/users/"$user" -[ -f auth/users/"$user"/key ] || -passtokey >auth/users/"$user"/key -printf 'ok' >auth/users/"$user"/status -printf 'never' >auth/users/"$user"/expire - -[ -f auth/users/sys/key ] || -passtokey >auth/users/sys/key -printf 'ok' >auth/users/sys/status -printf 'never' >auth/users/sys/expire - authsrv="$(command -v authsrv9)" -tcpserver="$(command -v tcpserver)" - -[ -h "$authsrv" ] && tcpserver="$(readlink "$authsrv")" -[ -h "$tcpserver" ] && tcpserver="$(readlink "$tcpserver")" +[ -h "$authsrv" ] && authsrv="$(readlink -f "$authsrv")" +ln -f "$authsrv" bin/authsrv9 -ln -f "$authsrv" bin -ln -f "$tcpserver" bin +[ -f "auth/users/josuah/key" ] +[ -f "auth/users/bootes/key" ] +[ -f "auth/users/sys/key" ] -exec tcpserver 0.0.0.0 "$port" chroot "$(dirname "$0")" authsrv0 +exec tcpserver 0.0.0.0 "$port" chroot "$(dirname "$0")" authsrv9 diff --git a/runit/u9fs/.gitignore b/runit/u9fs/.gitignore @@ -0,0 +1 @@ +u9fs.key