Skip to content

Commit

Permalink
Update supervisor config before restarting.
Browse files Browse the repository at this point in the history
  • Loading branch information
clutchski committed Dec 7, 2012
1 parent e7b72f3 commit dcc3102
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packaging/datadog-agent-deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ case "$1" in
adduser --system dd-agent --shell /bin/sh --no-create-home --quiet
chown -R dd-agent /etc/dd-agent

if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d datadog-agent restart
else
/etc/init.d/datadog-agent restart
fi

# Update the supervisor process group to ensure it has the proper
# configuration when we restart the datadog-agent.
echo "Reading supervisor configuration."
Expand All @@ -22,6 +16,12 @@ case "$1" in
echo "Updating supervisor configuration."
sleep 8 # FIXME mattp: Supervisor seems to need this time.
supervisorctl update || echo "Error updating supervisor configuration. Please restart supervisor."

if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d datadog-agent restart
else
/etc/init.d/datadog-agent restart
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
Expand Down

0 comments on commit dcc3102

Please sign in to comment.