You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# {{Description: This deploy hook will run the following code snippet to automate the installation of NewRelic Nginx plugin, and requires NEWRELIC_KEY and NEWRELIC_NGINX_NAME environment variables to be set on a stack.}}
2
+
if [ -z "$NEWRELIC_KEY" ]
3
+
then
4
+
>&2 echo "Please set your NEWRELIC_KEY environment variable"
5
+
exit 1
6
+
elif [ -z "$NEWRELIC_NGINX_NAME" ]
7
+
then
8
+
>&2 echo "Please set your NEWRELIC_NGINX_NAME environment variable"
9
+
exit 1
10
+
else
11
+
if [ -s /etc/apt/sources.list.d/nginx.list ]
12
+
then
13
+
sudo rm -f /etc/apt/sources.list.d/nginx.list
14
+
echo "deb http://nginx.org/packages/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list.d/nginx.list
15
+
else
16
+
echo "deb http://nginx.org/packages/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list.d/nginx.list
0 commit comments