Skip to content

Commit

Permalink
fix: increase control over how consensus service is started from dete…
Browse files Browse the repository at this point in the history
…rministic image (#17155)

Signed-off-by: Matt Riben <matt.riben@hashgraph.com>
  • Loading branch information
matteriben authored Jan 2, 2025
1 parent a484555 commit d47af54
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
if [ "${1}" != 256 ]; then
echo ${1} > /run/s6-linux-init-container-results/exitcode
else
echo "Hedera service killed by uncaught signal: $(kill -l ${2})(${2})"
echo "Consensus service killed by uncaught signal: $(kill -l ${2})(${2})"
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /command/with-contenv bash

# Usage:
# Start: /package/admin/s6/command/s6-svc -o /run/service/consensus
# Stop: /package/admin/s6/command/s6-svc -d /run/service/consensus

# Do not restart
s6-svc -O .

# Kill children on exit
trap "kill 0" EXIT

if [ "${AUTO_START_CONSENSUS_SERVICE:-true}" == false ]; then
# Exit on initial start
file=/tmp/consensus/s6-svc/start
if ! ps ho lstart 1 | diff ${file} - 2> /dev/null; then
mkdir -p $(dirname ${file})
ps ho lstart 1 > ${file}
exit
fi
fi

exec /opt/hgcapp/services-hedera/HapiApp2.0/entrypoint.sh

This file was deleted.

0 comments on commit d47af54

Please sign in to comment.