dot

packages and services management
Log | Files | Refs | README

commit 17665e9e7291a6f85d8d49afef95b7206509f2d8
parent 958f2685aa0e400125410b41d414e013133c0a87
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 23 Dec 2018 02:55:58 +0100

only keep s6-mk-build and s6-mk-compile

Diffstat:
Abin/s6-mk-build | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Rbin/service-compile -> bin/s6-mk-compile | 0
Rbin/service-list -> bin/s6-rc-list | 0
Rbin/service-log -> bin/s6-rc-log | 0
Rbin/service-status -> bin/s6-rc-status | 0
Dbin/service-build | 50--------------------------------------------------
Dbin/service-disable | 4----
Dbin/service-enable | 5-----
Rbin/service-init -> conf/s6-init | 0
Aconf/s6-mk-host | 6++++++
Metc/s6/host/kuntur/contents | 4++--
11 files changed, 58 insertions(+), 61 deletions(-)

diff --git a/bin/s6-mk-build b/bin/s6-mk-build @@ -0,0 +1,50 @@ +#!/usr/bin/env execlineb +elgetpositionals + +if { mkdir -p /var/s6/source } +cd /var/s6/source + +forx -o 0 x { ${@} } +importas sv x + +backtick -n x { heredoc 0 ${sv} cut -d , -f 1 } +importas base x + +backtick -n x { heredoc 0 ${sv} cut -s -d , -f 2- } +importas -s -d , mod x + +redirfd -r 0 /etc/s6/${base}/x/type +withstdinas x +importas -n type x + +if { cd /etc/s6/${base} redirfd -w 1 /dev/null ls -d ${mod} } +if { rm -rf ${sv},x ${sv},log } + +ifte { } { if { rm -rf ${sv},x ${sv},log } exit 1 } + +# copy all the modules +if { + forx -o 0 x { x ${mod} } importas x x + s6-hiercopy /etc/s6/${base}/${x} ${sv},x +} + +# build bundles recursively +if { + if -t { test ${type} = bundle } + backtick -i x { sed "s/^#.*//; /^[ \t]*$/ d; s/,x$//" ${sv},x/contents } + importas -s -d "\n" x x + s6-mk-build ${x} +} + +# setup the logger for longruns +if { + if -t { test ${type} = longrun } + ifthenelse { test -d /etc/s6/${sv}/log } + { s6-hiercopy /etc/s6/${sv}/log ${sv},log } + { s6-hiercopy /etc/s6/.s6-log ${sv},log } + if { redirfd -a 1 ${sv},x/producer-for echo ${sv},log } + if { redirfd -w 1 ${sv},log/env/SERVICE echo ${sv} } + if { redirfd -w 1 ${sv},log/consumer-for echo ${sv},x } +} + +if { cd ${sv},x if -t { test -x setup } ./setup } diff --git a/bin/service-compile b/bin/s6-mk-compile diff --git a/bin/service-list b/bin/s6-rc-list diff --git a/bin/service-log b/bin/s6-rc-log diff --git a/bin/service-status b/bin/s6-rc-status diff --git a/bin/service-build b/bin/service-build @@ -1,50 +0,0 @@ -#!/usr/bin/env execlineb -elgetpositionals - -if { mkdir -p /var/s6/source } -cd /var/s6/source - -forx -o 0 x { ${@} } -importas sv x - -backtick -n x { heredoc 0 ${sv} cut -d , -f 1 } -importas base x - -backtick -n x { heredoc 0 ${sv} cut -s -d , -f 2- } -importas -s -d , mod x - -redirfd -r 0 /etc/s6/${base}/x/type -withstdinas x -importas -n type x - -if { cd /etc/s6/${base} redirfd -w 1 /dev/null ls -d ${mod} } -if { rm -rf ${sv},x ${sv},log } - -ifte { } { if { rm -rf ${sv},x ${sv},log } exit 1 } - -# copy all the modules -if { - forx -o 0 x { x ${mod} } importas x x - s6-hiercopy /etc/s6/${base}/${x} ${sv},x -} - -# build bundles recursively -if { - if -t { test ${type} = bundle } - backtick -i x { sed "s/^#.*//; /^[ \t]*$/ d; s/,x$//" ${sv},x/contents } - importas -s -d "\n" x x - service-build ${x} -} - -# setup the logger for longruns -if { - if -t { test ${type} = longrun } - ifthenelse { test -d /etc/s6/${sv}/log } - { s6-hiercopy /etc/s6/${sv}/log ${sv},log } - { s6-hiercopy /etc/s6/.s6-log ${sv},log } - if { redirfd -a 1 ${sv},x/producer-for echo ${sv},log } - if { redirfd -w 1 ${sv},log/env/SERVICE echo ${sv} } - if { redirfd -w 1 ${sv},log/consumer-for echo ${sv},x } -} - -if { cd ${sv},x if -t { test -x setup } ./setup } diff --git a/bin/service-disable b/bin/service-disable @@ -1,4 +0,0 @@ -#!/usr/bin/env execlineb -elgetpositionals - -rm -rf /var/s6/source/${@},x /var/s6/source/${@},log diff --git a/bin/service-enable b/bin/service-enable @@ -1,5 +0,0 @@ -#!/usr/bin/env execlineb -elgetpositionals - -if { service-build ${@} } -if { service-compile } diff --git a/bin/service-init b/conf/s6-init diff --git a/conf/s6-mk-host b/conf/s6-mk-host @@ -0,0 +1,6 @@ +#!/usr/bin/env execlineb + +backtick -n x { hostname } +importas hostname x + +s6-mk add host,${hostname} diff --git a/etc/s6/host/kuntur/contents b/etc/s6/host/kuntur/contents @@ -1,8 +1,8 @@ geomyidae,ipv4,x geomyidae,ipv6,x git-daemon,x -httpfile,tcp,x -httpfile,tls,h-o.st,x +httpd,tcp,x +httpd,tls,h-o.st,x qmail-smtpd,tcp,josuah.net,x qmail-smtpd,tls,josuah.net,x tinysshd,x