dot

packages and services management
Log | Files | Refs | README

commit c3744a2981a61406eacb4751c923b7a1778813b0
parent 653b9a5ff0cd105170e3c25abb3e280150a4a0e9
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 10 Nov 2018 16:06:26 +0100

bin/service-*: fix paths

Diffstat:
Mbin/service-enable | 4++--
Mbin/service-init | 10+++++-----
Ms6/ssh-agent/x/run | 1+
3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/bin/service-enable b/bin/service-enable @@ -9,12 +9,12 @@ ifelse { pipeline { dollarat } grep -Evq "^[^/]+/[^/]+\$" } { forbacktickx -n src { dollarat } importas src src backtick -n dir { dirname $src } importas dir dir backtick -n dst { pipeline { echo $src } tr / - } importas dst dst -define -n log ${dst}-log importas log log +define -n log ${dst}-log 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 { s6-hiercopy /etc/s6/s6-log/x $log } 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 } diff --git a/bin/service-init b/bin/service-init @@ -5,19 +5,19 @@ if { s6-mkdir -p /run/s6 /var/log /var/s6/.s6-rc } if { s6-mkfifo /var/s6/.s6-rc/log } cd /var/s6 -if { cp -r /etc/s6/s6-svscan/log /var/s6/s6-svscan-log } +if { cp -r /etc/s6/s6-svscan/log s6-svscan-log } background { - redirfd -r 1 init/fifo + redirfd -r 1 .s6-rc/log s6-log /var/log/s6-svscan t } background { backtick -n t { s6-clock } importas t t - if { s6-rc-compile compiled$t current } + if { s6-rc-compile .s6-rc/compiled$t . } if { s6-rc-init -c /var/s6/.s6-rc/compiled$t -l /var/s6/.s6-rc/live /run/s6 } - redirfd -w 1 init/fifo # wait that s6-svscan start + redirfd -w 1 .s6-rc/log # wait that s6-svscan start if { importas ! ! kill $! } # then kill s6-log if { s6-rc -l live -u change s6-svscan-log } if { s6-rc -l live -u change ok-all } @@ -25,7 +25,7 @@ background { } redirfd -r 0 /dev/null -redirfd -wnb 1 init/fifo +redirfd -wnb 1 .s6-rc/log fdmove -c 2 1 s6-svscan -t0 /run/s6 diff --git a/s6/ssh-agent/x/run b/s6/ssh-agent/x/run @@ -5,5 +5,6 @@ fdmove -c 2 1 s6-envdir env multisubstitute { backtick -n home { homeof $USER } importas home home +if { rm -f ${home}/.ssh/auth.sock } s6-setuidgid $USER ssh-agent -d -a ${home}/.ssh/auth.sock