cluster.sh breaks on first run when no vault PID is found
aeliton opened this issue · 0 comments
aeliton commented
OS: Debian/bullseye
I'm following raft-ha-storage tutorial and found that the ./cluster.sh setup vault_1
command fails because it uses the following line to kill previous vault instances, but it fails if none is found.
ps aux | grep "vault server" | grep -v grep | awk '{print $2}' | xargs kill
The output is:
➜ new_cluster git:(master) ✗ ./cluster.sh setup vault_1
+ ps aux
+ grep 'vault server'
+ grep -v grep
+ xargs kill
+ awk '{print $2}'
Usage:
kill [options] <pid> [...]
Options:
<pid> [...] send signal to every <pid> listed
-<signal>, -s, --signal <signal>
specify the <signal> to be sent
-l, --list=[<signal>] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table
-h, --help display this help and exit
-V, --version output version information and exit
For more details see kill(1).