cmd/storagenode: fix failing supervisord "processes" eventlistener
/bin/stop-supervisor fails in posix shell since the standard read utility takes at least one variable's name as argument. Changing the header #!bin/sh to #!/bin/bash fixes this issue. `read` with no variable's name works in bash. Looks like the shell in alpine isn't POSIX-compliant so we didn't encounter this issue on alpine. Also, I changed the name from "processes" to "processes-exit-eventlistener" to make it clearer in the logs since supervisord spawns event listeners as separate processes. Change-Id: Ife9378c2013e2eb54f2adcd52a163d64eaacbbab
This commit is contained in:
parent
87cb2e92b9
commit
9751ac9de2
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
printf "READY\n";
|
||||
|
||||
|
@ -35,6 +35,6 @@ stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stdout
|
||||
stderr_logfile_maxbytes=0
|
||||
|
||||
[eventlistener:processes]
|
||||
[eventlistener:processes-exit-eventlistener]
|
||||
command=/bin/stop-supervisor
|
||||
events=PROCESS_STATE_EXITED, PROCESS_STATE_FATAL
|
Loading…
Reference in New Issue
Block a user