forked from Kav91/nri-flex-concept
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_linux.sh
39 lines (32 loc) · 1.19 KB
/
install_linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
echo "New Relic Integration Installer"
if [ "$EUID" -ne 0 ]
then echo "Please run with sudo or as root"
exit
fi
echo "Stopping NR Infrastructure Agent"
if [ -f /etc/systemd/system/newrelic-infra.service ]; then
echo "SYSTEMD"
service newrelic-infra stop
fi
if [ -f /etc/init/newrelic-infra.conf ]; then
echo "INITCTL"
initctl stop newrelic-infra
fi
echo "Copying Files"
cp ./nri-flex-config.yml /etc/newrelic-infra/integrations.d/
cp ./nri-flex-def-nix.yml /var/db/newrelic-infra/custom-integrations/
cp ./nri-flex /var/db/newrelic-infra/custom-integrations/
# if you want JMX support, remember you will need Java 7+ installed
# cp -avr ./nrjmx /var/db/newrelic-infra/custom-integrations/
# this will copy all configs, only take what you need
# cp -avr ./flexConfigs /var/db/newrelic-infra/custom-integrations/
# this will copy all container discovery configs, only take what you need
# cp -avr ./flexContainerDiscovery /var/db/newrelic-infra/custom-integrations/
echo "Starting NR Infrastructure Agent"
if [ -f /etc/systemd/system/newrelic-infra.service ]; then
service newrelic-infra start
fi
if [ -f /etc/init/newrelic-infra.conf ]; then
initctl start newrelic-infra
fi