rebar3/_build/default/lib/relx/priv/templates/builtin_hook_pid

13 lines
229 B
Bash

#!/bin/sh
# loop until the VM starts responding to pings
while ! erl_rpc erlang is_alive > /dev/null
do
sleep 1
done
# get the beam pid and write it to the file passed as
# argument
PID="$(relx_get_pid)"
echo "$PID" > "$1"