Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions anax-in-container/script/agbot_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@

# Script to start agbot from inside the container

if [ -z "$ANAX_LOG_LEVEL" ]; then
if [ -z "${ANAX_LOG_LEVEL}" ]; then
ANAX_LOG_LEVEL=3
fi

/usr/bin/envsubst < /etc/horizon/anax.json.tmpl > /etc/horizon/anax.json
/usr/horizon/bin/anax -v $ANAX_LOG_LEVEL -logtostderr -config /etc/horizon/anax.json
/usr/horizon/bin/anax -v "${ANAX_LOG_LEVEL}" -logtostderr -config /etc/horizon/anax.json &
ANAX_PID=$!

# If we receive SIGTERM, forward it to anax to start graceful termination
send_sigterm() {
kill "${ANAX_PID}" 2>/dev/null
}
trap send_sigterm TERM

# Wait for anax termination
wait "${ANAX_PID}"
12 changes: 11 additions & 1 deletion css/script/css_start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/bin/bash

/usr/bin/envsubst < /etc/edge-sync-service/sync.conf.tmpl > /etc/edge-sync-service/sync.conf
/home/cssuser/cloud-sync-service
/home/cssuser/cloud-sync-service &
CSS_PID=$!

# If we receive SIGTERM, forward it to css to start graceful termination
send_sigterm() {
kill "${CSS_PID}" 2>/dev/null
}
trap send_sigterm TERM

# Wait for css termination
wait "${CSS_PID}"