[21583] trunk/dports/net/smokeping
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jan 29 13:31:28 PST 2007
Revision: 21583
http://trac.macosforge.org/projects/macports/changeset/21583
Author: markd at macports.org
Date: 2007-01-29 13:31:27 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Set apache docroot with reinplace for either Apple's Apache or MacPorts, depending
whether the apple_apache variant is set or not.
Modified Paths:
--------------
trunk/dports/net/smokeping/Portfile
trunk/dports/net/smokeping/files/patch-etc-config.dist
Modified: trunk/dports/net/smokeping/Portfile
===================================================================
--- trunk/dports/net/smokeping/Portfile 2007-01-29 20:33:03 UTC (rev 21582)
+++ trunk/dports/net/smokeping/Portfile 2007-01-29 21:31:27 UTC (rev 21583)
@@ -45,6 +45,8 @@
set smokedata ${prefix}/var/smokeping
set smokeetc ${prefix}/etc/smokeping
set smokedoc ${prefix}/share/doc/smokeping
+set apple_apache_docroot /Library/WebServer/Documents
+set macports_apache_docroot ${prefix}/apache2/htdocs
startupitem.create yes
startupitem.name smokeping
@@ -61,6 +63,14 @@
build {}
post-patch {
+if { [variant_isset apple_apache] } {
+ reinplace "s|__APACHE__DOCROOT__|${apple_apache_docroot}|g" \
+ ${worksrcpath}/etc/config.dist
+} else {
+ reinplace "s|__APACHE__DOCROOT__|${macports_apache_docroot}|g" \
+ ${worksrcpath}/etc/config.dist
+}
+
eval reinplace "s|__PREFIX__|${prefix}|g" \
[glob ${worksrcpath}/bin/*.dist] \
[glob ${worksrcpath}/etc/*.dist] \
@@ -68,7 +78,6 @@
eval reinplace "s|__PERL5__ARCHLIB__|${perl5.archlib}|g" \
[glob ${worksrcpath}/bin/*.dist] \
- [glob ${worksrcpath}/etc/*.dist] \
[glob ${worksrcpath}/htdocs/*.dist]
eval reinplace "s|/usr/bin/perl|${prefix}/bin/perl|g" \
@@ -174,33 +183,8 @@
sudo chown -R www:www ${prefix}/var/smokeping/
-4) Rename and edit the ${smokeetc}/config sample file.
+4) Setup Smokeping logging.
- -Remove the .dist extension to activate the config file.
-
- cd ${smokeetc}
- sudo mv config.dist config
-
- -Paths are set by MacPorts, leave them alone.
-
- -Customize variables.
- * General * - owner, contact, and mailhost
- * Alerts * - to, from addresses
-
- -Then clear the examples \(they have a leading '+'\) in the *** Targets ***
- section and set your own.
-
- + My Web Server
- menu = MyWebServer
- title = My Web Server
- host = mywebserver.mydomain.com
- alerts = bigloss,someloss,startloss
-
- -See sample configurations and examples in ${prefix}/share/doc/smokeping/.
-
-
-5) Setup Smokeping logging.
-
-Add this statement to /etc/syslog.conf.
local1.* ${smokedata}/log/smokeping.log
@@ -216,8 +200,37 @@
sudo kill -HUP `cat /var/run/syslog.pid`
-5) Start Smokeping and verify it is running. (Give it a minute to start)
+5) Rename and edit the ${smokeetc}/config sample file, then test your config file.
+ -Remove the .dist extension. Smokeping's config file must be named 'config'.
+
+ cd ${smokeetc}
+ sudo mv config.dist config
+
+ -Paths are set by MacPorts, leave them alone.
+
+ -Customize variables.
+ * General * - owner, contact, and mailhost
+ * Alerts * - to, from addresses
+
+ -Then clear the examples \(they have a leading '+'\) in the *** Targets ***
+ section and set your own.
+
+ + My Web Server
+ menu = MyWebServer
+ title = My Web Server
+ host = mywebserver.mydomain.com
+ alerts = bigloss,someloss,startloss
+
+ -See sample configurations and examples in ${prefix}/share/doc/smokeping/.
+
+ -Perform a config file test and correct any config file errors detected.
+
+ smokeping --test
+
+
+6) Start Smokeping and verify it is running. (Give it a minute to start)
+
sudo launchctl load -w /Library/LaunchDaemons/org.macports.smokeping.plist
ps -ax |grep smoke
@@ -226,7 +239,7 @@
1754 S 0:01.56 ${prefix}/bin/speedy_backend -w ${prefix}/apache2/htdocs/smokeping/smokeping.cgi
-6) Check the Smokeping graphs with a web browser.
+7) Check the Smokeping graphs with a web browser.
Go to http://localhost/smokeping/smokeping.cgi
\n"
Modified: trunk/dports/net/smokeping/files/patch-etc-config.dist
===================================================================
--- trunk/dports/net/smokeping/files/patch-etc-config.dist 2007-01-29 20:33:03 UTC (rev 21582)
+++ trunk/dports/net/smokeping/files/patch-etc-config.dist 2007-01-29 21:31:27 UTC (rev 21583)
@@ -13,7 +13,7 @@
-smokemail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/smokemail.dist
-tmail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/tmail.dist
+sendmail = /usr/sbin/sendmail
-+imgcache = __PREFIX__/apache2/htdocs/smokeping/img
++imgcache = __APACHE__DOCROOT__/smokeping/img
+imgurl = http://localhost/smokeping/img
+datadir = __PREFIX__/var/smokeping
+piddir = /var/run
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070129/02f5e18a/attachment.html
More information about the macports-changes
mailing list