Skip to content

Instantly share code, notes, and snippets.

@matesio
Created October 29, 2018 09:59
Show Gist options
  • Save matesio/cb9c3f087615f96485785e8162da5adf to your computer and use it in GitHub Desktop.
Save matesio/cb9c3f087615f96485785e8162da5adf to your computer and use it in GitHub Desktop.
#!/bin/bash
# .ebextensions/datadog/hooks/99start_datadog.sh
STATUS=`sudo initctl status datadog-agent`
if [[ "$STATUS" == *"datadog-agent start/running"* ]]
then
echo "Agent already running"
else
echo "Agent starting..."
sudo initctl start datadog-agent
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment