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:
Clement Sam 2022-05-04 02:37:01 +00:00
parent 87cb2e92b9
commit 9751ac9de2
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
printf "READY\n";

View File

@ -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