File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
pkg/workloads/cortex/serve/init Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ create_s6_service() {
95
95
# https://skarnet.org/software/s6/s6-svscanctl.html
96
96
# http://skarnet.org/software/s6/s6-svc.html
97
97
# http://skarnet.org/software/s6/servicedir.html
98
+
99
+ # good pages to read about execline
98
100
# http://www.troubleshooters.com/linux/execline.htm
101
+ # https://danyspin97.org/blog/getting-started-with-execline-scripting/
99
102
100
103
service_name=$1
101
104
cmd=$2
@@ -110,7 +113,7 @@ create_s6_service() {
110
113
111
114
dest_script=" $dest_dir /finish"
112
115
echo " #!/usr/bin/execlineb -S0" > $dest_script
113
- echo " ifelse { s6-test \$ {1} -ne 0 } { s6-svscanctl -t /var/run/s6/services }" >> $dest_script
116
+ echo " ifelse { s6-test \$ {1} -ne 0 } { foreground { redirfd -w 1 /var/run/s6/env-stage3/S6_STAGE2_EXITED s6-echo -n -- \$ {1} } s6-svscanctl -t /var/run/s6/services }" >> $dest_script
114
117
echo " s6-svc -O /var/run/s6/services/$service_name " >> $dest_script
115
118
chmod +x $dest_script
116
119
}
You can’t perform that action at this time.
0 commit comments