dot

packages and services management
Log | Files | Refs | README

commit f74edcd8674a6cf76fd7565bae51bbf734813af5
parent d281fbc98e65e66c6df69c6ad6f7349dbba25faf
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu,  8 Nov 2018 23:30:02 +0100

bin/service-*: /var/s6/source -> /var/s6/current

Diffstat:
Mbin/service-disable | 2+-
Mbin/service-enable | 4++--
Mbin/service-init | 6+++---
Mbin/service-load | 2+-
Ms6/tinysshd/x/run | 2+-
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/bin/service-disable b/bin/service-disable @@ -1,5 +1,5 @@ #!/usr/bin/env execlineb -cd /var/s6/source +cd /var/s6/current if { mkdir -p ok-all } if { touch ok-all/contents } diff --git a/bin/service-enable b/bin/service-enable @@ -1,5 +1,5 @@ #!/usr/bin/env execlineb -cd /var/s6/source +cd /var/s6/current ifelse { pipeline { dollarat } grep -Evq "^[^/]+/[^/]+\$" } { foreground { echo "usage: service-enable service/version..." } @@ -15,8 +15,8 @@ if { rm -rf $dst $log } if { s6-hiercopy /etc/s6/s6-log/x $log } if { s6-hiercopy /etc/s6/${dir}/x $dst } if { s6-hiercopy /etc/s6/${src} $dst } -if { redirfd -w 1 ${dst}/env/SERVICE echo $dst } if { redirfd -w 1 ${dst}/producer-for echo $log } if { redirfd -w 1 ${log}/consumer-for echo $dst } +if { redirfd -w 1 ${log}/env/SERVICE echo $dst } if { pipeline { echo $dst } sort -u -o ok-all/contents ok-all/contents - } if { pipeline { echo $log } sort -u -o ok-all/contents ok-all/contents - } diff --git a/bin/service-init b/bin/service-init @@ -1,11 +1,11 @@ #!/usr/bin/env execlineb if { s6-rmrf /run/s6 /var/s6/init } -if { s6-mkdir -p /run/s6 /var/log /var/s6/init /var/s6/source } +if { s6-mkdir -p /run/s6 /var/log /var/s6/init /var/s6/current } if { s6-mkfifo /var/s6/init/fifo } cd /var/s6 -if { cp -r /etc/s6/s6-svscan/log /var/s6/source/s6-svscan-log } +if { cp -r /etc/s6/s6-svscan/log /var/s6/current/s6-svscan-log } background { redirfd -r 1 init/fifo @@ -14,7 +14,7 @@ background { background { backtick -n t { s6-clock } importas t t - if { s6-rc-compile compiled$t source } + if { s6-rc-compile compiled$t current } if { s6-rc-init -c /var/s6/compiled$t -l /var/s6/live /run/s6 } if { s6-ln -nsf compiled$t compiled } diff --git a/bin/service-load b/bin/service-load @@ -1,7 +1,7 @@ #!/usr/bin/env execlineb backtick t { s6-clock } importas -n t t -if { s6-rc-compile /var/s6/compiled$t /var/s6/source } +if { s6-rc-compile /var/s6/compiled$t /var/s6/current } if { s6-rc-update -l /var/s6/live /var/s6/compiled$t } if { s6-ln -nsf /var/s6/compiled$t /var/s6/compiled } if { s6-rc -l /var/s6/live -u change ok-all } diff --git a/s6/tinysshd/x/run b/s6/tinysshd/x/run @@ -1,5 +1,5 @@ #!/usr/bin/env execlineb -fdmove -c 1 +fdmove -c 2 1 s6-envdir env multisubstitute { importas PORT PORT }