31 lines
1.1 KiB
Ruby
31 lines
1.1 KiB
Ruby
cask 'datadog-agent' do
|
|
version '6.1.2-1'
|
|
sha256 'e2399cc9ddbf9f2ffecd32b48698857d1fd23cd504bd3527f0bb73c94d83542f'
|
|
|
|
# s3.amazonaws.com/dd-agent was verified as official when first introduced to the cask
|
|
url "https://s3.amazonaws.com/dd-agent/datadog-agent-#{version}.dmg"
|
|
name 'Datadog Agent'
|
|
homepage 'https://www.datadoghq.com/'
|
|
|
|
pkg "datadog-agent-#{version}.pkg"
|
|
|
|
preflight do
|
|
require 'etc'
|
|
File.open('/tmp/datadog-install-user', 'w') { |f| f.write(Etc.getlogin) }
|
|
end
|
|
|
|
uninstall pkgutil: 'com.datadoghq.agent'
|
|
|
|
zap trash: '/opt/datadog-agent'
|
|
|
|
caveats <<~EOS
|
|
You will need to update /opt/datadog-agent/etc/datadog.conf and replace APIKEY with your api key
|
|
|
|
If you ever want to start/stop the Agent, please use the Datadog Agent App or datadog-agent command.
|
|
It will start automatically at login, if you want to enable it at startup, run these commands:
|
|
|
|
sudo cp '/opt/datadog-agent/etc/com.datadoghq.agent.plist' /Library/LaunchDaemons
|
|
sudo launchctl load -w /Library/LaunchDaemons/com.datadoghq.agent.plist
|
|
EOS
|
|
end
|