Created
October 29, 2018 10:00
-
-
Save matesio/aed1e4832cdd2e1daeb916d4db0a4600 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# .ebextensions/datadog/hooks/99stop_datadog.sh | |
STATUS=`sudo initctl status datadog-agent` | |
if [[ "$STATUS" == *"datadog-agent stop/waiting"* ]] | |
then | |
echo "Agent already stopped" | |
else | |
echo "Agent stopping..." | |
sudo initctl stop datadog-agent | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment