Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(install): fail install if Otelcol is not running on darwin
Browse files Browse the repository at this point in the history
swiatekm committed Dec 6, 2023
1 parent 947844c commit addd518
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1931,6 +1931,13 @@ if [[ "${OS_TYPE}" == "darwin" ]]; then
launchctl unload "${LAUNCHD_CONFIG}"
launchctl load -w "${LAUNCHD_CONFIG}"

echo 'Waiting 10s before checking status'
sleep 10
if ! launchctl print system/otelcol-sumo | grep "state = running"; then
echo "Failed to launch otelcol"
tail /var/log/otelcol-sumo/otelcol-sumo.log
exit 1
fi
exit 0
fi

@@ -2127,4 +2134,9 @@ systemctl restart otelcol-sumo

echo 'Waiting 10s before checking status'
sleep 10
systemctl status otelcol-sumo --no-pager
if ! systemctl status otelcol-sumo --no-pager; then
echo "Failed to launch otelcol"
exit 1
fi

exit 0

0 comments on commit addd518

Please sign in to comment.