svn commit: r387623 - in head/net-mgmt/observium: . files
Mark Felder
feld at FreeBSD.org
Wed May 27 15:54:38 UTC 2015
Author: feld
Date: Wed May 27 15:54:36 2015
New Revision: 387623
URL: https://svnweb.freebsd.org/changeset/ports/387623
Log:
Fix PATH issues for poller scripts used as cron entries
We don't have /usr/local/{bin,sbin} in cron PATH by default
Submitted by: mat
Added:
head/net-mgmt/observium/files/patch-poller-wrapper.py (contents, props changed)
head/net-mgmt/observium/files/patch-poller.php (contents, props changed)
Modified:
head/net-mgmt/observium/Makefile
Modified: head/net-mgmt/observium/Makefile
==============================================================================
--- head/net-mgmt/observium/Makefile Wed May 27 15:42:51 2015 (r387622)
+++ head/net-mgmt/observium/Makefile Wed May 27 15:54:36 2015 (r387623)
@@ -80,6 +80,9 @@ USE_MYSQL= server
USE_MYSQL= client
.endif
+post-patch:
+ ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
+
do-install:
@${MKDIR} ${STAGEDIR}/${WWWDIR}
.for dir in ${ROOT_DIRS}
Added: head/net-mgmt/observium/files/patch-poller-wrapper.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/observium/files/patch-poller-wrapper.py Wed May 27 15:54:36 2015 (r387623)
@@ -0,0 +1,17 @@
+--- poller-wrapper.py.orig 2014-11-04 16:14:27 UTC
++++ poller-wrapper.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! %%LOCALBASE%%/bin/python
+ """
+ poller-wrapper A small tool which wraps around the Observium poller
+ and tries to guide the polling process with a more modern
+@@ -38,6 +38,8 @@ except:
+ print "threading, Queue, sys, subprocess, time, os, json"
+ sys.exit(2)
+
++os.environ['PATH'] += ':%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin'
++
+ try:
+ import MySQLdb
+ except:
Added: head/net-mgmt/observium/files/patch-poller.php
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/observium/files/patch-poller.php Wed May 27 15:54:36 2015 (r387623)
@@ -0,0 +1,8 @@
+--- poller.php.orig 2015-05-27 15:48:33 UTC
++++ poller.php
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env php
++#!%%LOCALBASE%%/bin/php
+ <?php
+
+ /**
More information about the svn-ports-all
mailing list