Created
March 11, 2022 15:42
-
-
Save ryanvgates/80d3699fcc580bd223cab19536a52f84 to your computer and use it in GitHub Desktop.
Update Sensu Config
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
client_json=/etc/sensu/conf.d/client.json | |
sudo apt install --assume-yes jq && \ | |
sudo cp $client_json $client_json.backup.$(date +"%Y_%m_%d-%H_%M_%S") && \ | |
contents="$(sudo jq '.client.environment = "new environment"' $client_json)" && \ | |
sudo echo "${contents}" | sudo tee $client_json && \ | |
sudo systemctl restart sensu-client.service && \ | |
sudo systemctl status sensu-client.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment