import: Only read last time from sql if --incremental lacks timestamp
[nagios-reports-module.git] / op5build / collax / postinst
blobf56c2a12441be3ae5987ab5cfa011f709d76a894
1 #!/bin/bash
3 # On upgrade, make sure to point Nagios to the new module
4 # location, since it changed between 1.0.0 and 1.0.1
5 sed -i 's#/opt/op5/monitor/op5/ndbneb#/opt/op5/monitor/op5/reports/module#g' /opt/op5/monitor/etc/nagios.cfg
7 # Add the module to the nagios configuration
8 grep -q ndbneb.so /opt/op5/monitor/etc/nagios.cfg || sed -i 's#^log_file.*#broker_module=/opt/op5/monitor/op5/reports/module/ndbneb.so /opt/op5/monitor/op5/reports/module/ndbneb.conf\n\n&#' /opt/op5/monitor/etc/nagios.cfg
10 # now start monitor again
11 /etc/init.d/op5-monitor start
14 exit 0