diff -ruN observium.org/Makefile observium/Makefile --- observium.org/Makefile 2016-11-14 18:33:27.203209000 +0100 +++ observium/Makefile 2016-11-14 20:41:51.261536000 +0100 @@ -3,7 +3,6 @@ PORTNAME= observium PORTVERSION= 0.16.10.8128 -PORTREVISION= 0 CATEGORIES= net-mgmt MASTER_SITES= http://www.observium.org/ DISTNAME= ${PORTNAME}-community-latest @@ -12,7 +11,10 @@ MAINTAINER= dirkx@webweaving.org COMMENT= Autodiscovering PHP/MySQL/SNMP based network monitoring -LICENSE= GPLv3 +LICENSE= EULA +LICENSE_NAME= "Observium License Version 1.0" +LICENSE_FILE= ${WRKSRC}/LICENSE.COMMUNITY +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept WRKSRC= ${WRKDIR}/${PORTNAME} @@ -89,7 +91,7 @@ .include -SUB_FILES+= pkg-message +SUB_FILES+= pkg-message observium.conf.sample SUB_LIST+= PHP="${PHPBASE}/bin/php" PYTHON=${PHPBASE}/bin/python ROOT_FILES= rename_device.php snmptrap.php add_device.php \ @@ -119,7 +121,7 @@ ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php do-install: - ${MKDIR} ${STAGEDIR}/${WWWDIR} + ${MKDIR} ${STAGEDIR}/${WWWDIR} ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes .for dir in ${ROOT_DIRS} ${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir} cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir} @@ -148,5 +150,6 @@ ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${EXAMPLESDIR} .endfor .endif + ${INSTALL_DATA} ${WRKDIR}/observium.conf.sample ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes .include diff -ruN observium.org/files/observium.conf.sample.in observium/files/observium.conf.sample.in --- observium.org/files/observium.conf.sample.in 1970-01-01 01:00:00.000000000 +0100 +++ observium/files/observium.conf.sample.in 2016-11-14 20:51:06.738037000 +0100 @@ -0,0 +1,66 @@ + +# Observium cannot be ran on a sub-uri (See the FAW +# http://observium.org/docs/faq/). Hence this strawman +# config runs it as a virtual host on port 8080. +# +# Replace the '*:8080' by the actual virtual host(name) +# you will be using; and consider enabling SSL. An example +# can be fund at e /usr/local/etc/apache24/extra/httpd-ssl.conf +# + +Listen *:8080 + + Documentroot "%%WWWDIR%%/html" + AddHandler application/x-httpd-php .php + # + # CustomLog "/var/log/httpd-observium-access.log" common + + DirectoryIndex index.php + + Options Indexes FollowSymLinks Multiviews + AllowOverride None + + # These:w statement mirror the .htaccess + # files that are part of the normal + # Observium distribution. See the URL: + # + # https://httpd.apache.org/docs/current/howto/htaccess.html#when + # + # for the various reasons to promote + # these to an apache config file. + # + RedirectMatch 404 /\. + + RewriteEngine on + RewriteBase / + + # Block access to hidden files/dirs + RewriteRule ^\..*$ - [F,L] + # Don't favicon! + RewriteCond %{REQUEST_FILENAME} !^favicon\.ico + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php) + RewriteCond %{REQUEST_URI} !^api/ + RewriteCond %{REQUEST_URI} !^rrd/ + RewriteCond %{REQUEST_URI} !=/server-status + RewriteRule ^(.*)$ index.php/$1/ + + AcceptPathInfo On + Require all granted + + + + deny from all + + + + deny from all + + + + deny from all + + + + diff -ruN observium.org/files/pkg-message.in observium/files/pkg-message.in --- observium.org/files/pkg-message.in 2016-11-14 18:33:27.204328000 +0100 +++ observium/files/pkg-message.in 2016-11-14 20:51:41.266810000 +0100 @@ -56,7 +56,21 @@ 5: Install the above crontabs. +6: Copy the file + + mv %%PREFIX%%/%%APACHEETCDIR%%/Includes/observium.conf.sample \ + %%PREFIX%%/%%APACHEETCDIR%%/Includes/observium.conf + + and edit it to fill out a port number and hostname. + +7: restart the webserver with + + apachectl restart + + or stop/start if in case of IP or SSL changes. + 6: log in with a web browser; using the username 'admin' and the password 'SomeInsecureAdminPassword'. Hosts can be added from the webinterface or from the commandline. + diff -ruN observium.org/pkg-plist observium/pkg-plist --- observium.org/pkg-plist 2016-11-14 18:33:27.207834000 +0100 +++ observium/pkg-plist 2016-11-14 19:23:32.366936000 +0100 @@ -11549,3 +11549,4 @@ @dir(www,www,) %%WWWDIR%%/logs @dir(www,www,) %%WWWDIR%%/rrd @dir %%WWWDIR%%/scripts/agent-local/munin-scripts +%%APACHEETCDIR%%/Includes/observium.conf.sample