Skip to content

Commit

Permalink
spec: Only put pnp_path in place once
Browse files Browse the repository at this point in the history
Grepping for something requires us to put the parts in the right order.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
  • Loading branch information
Robin Sonefors committed Oct 26, 2012
1 parent 9388e49 commit a12b430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions op5build/livestatus.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ cp -a src/unixcat %buildroot%_bindir


%post
if ! grep -q 'broker_module.*livestatus.o' %nagios_cfg; then
if ! grep -q 'broker_module.*livestatus\.o' %nagios_cfg; then
sed -i "s#^log_file.*#broker_module=%mod_path/livestatus.o pnp_path=/opt/monitor/op5/pnp/perfdata /opt/monitor/var/rw/live\\n\\n&#" \
%nagios_cfg
elif ! grep -q 'broker_module.*pnp_path.*livestatus.o' %nagios_cfg; then
elif ! grep -q 'broker_module.*livestatus\.o.*pnp_path' %nagios_cfg; then
sed -i "s#broker_module=%mod_path/livestatus.o#broker_module=%mod_path/livestatus.o pnp_path=/opt/monitor/op5/pnp/perfdata#" \
%nagios_cfg
fi
Expand Down

0 comments on commit a12b430

Please sign in to comment.