From 125e0612222925486c7911433fb286092add98a7 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sun, 31 Dec 2017 12:37:08 -0500 Subject: no bug - add utility to toggle USE_NYTPROF (#323) --- vagrant_support/use-nytprof | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 vagrant_support/use-nytprof (limited to 'vagrant_support/use-nytprof') diff --git a/vagrant_support/use-nytprof b/vagrant_support/use-nytprof new file mode 100644 index 000000000..7c9dd3fba --- /dev/null +++ b/vagrant_support/use-nytprof @@ -0,0 +1,12 @@ +#!/bin/bash + +USE_NYTPROF="$1" +if [[ -z $USE_NYTPROF ]]; then + USE_NYTPROF=1 +fi + +perl -e 'warn "Devel::NYTProf is ", $ARGV[0] ? "enabled" : "disabled", "\n";' "$USE_NYTPROF" + +sudo env USE_NYTPROF="$USE_NYTPROF" perl -i -pe 's/^\s*(PerlSetEnv\s+USE_NYTPROF\b).*$/$1 $ENV{USE_NYTPROF}/gmi' \ + /etc/httpd/conf.d/bugzilla.conf +sudo service httpd restart \ No newline at end of file -- cgit v1.2.3-24-g4f1b