[128940] trunk/dports/net/argus-monitor/Portfile
devans at macports.org
devans at macports.org
Sun Nov 30 10:08:20 PST 2014
Revision: 128940
https://trac.macports.org/changeset/128940
Author: devans at macports.org
Date: 2014-11-30 10:08:20 -0800 (Sun, 30 Nov 2014)
Log Message:
-----------
argus-monitor: add mode line and reformat, white space only.
Modified Paths:
--------------
trunk/dports/net/argus-monitor/Portfile
Modified: trunk/dports/net/argus-monitor/Portfile
===================================================================
--- trunk/dports/net/argus-monitor/Portfile 2014-11-30 17:36:02 UTC (rev 128939)
+++ trunk/dports/net/argus-monitor/Portfile 2014-11-30 18:08:20 UTC (rev 128940)
@@ -1,90 +1,93 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
-PortSystem 1.0
-name argus-monitor
-version 3.5
-revision 3
-categories net
-maintainers nomaintainer
-description The All Seeing System and Network Monitoring Software
-long_description ${description}
-homepage http://argus.tcp4me.com/
-platforms darwin
-master_sites http://www.tcp4me.com/code/argus-archive/
-checksums md5 7a946b17a61edeb1b455f2ab45acf77d
-distfiles argus-${version}.tgz
-worksrcdir argus-${version}
+PortSystem 1.0
-depends_lib port:perl5.12 \
- port:postfix \
- port:openssl \
- port:freetype \
- port:gd2 \
- port:fping \
- port:db44 \
- port:p5.12-dbi \
- port:p5.12-berkeleydb \
- port:p5.12-socket6 \
- port:p5.12-gd \
- port:p5.12-time-hires \
- port:p5.12-net-ssleay \
- port:p5.12-digest-hmac \
- port:p5.12-digest-md5 \
- port:p5.12-digest-sha1 \
- port:p5.12-crypt-des
+name argus-monitor
+version 3.5
+revision 3
+categories net
+maintainers nomaintainer
+description The All Seeing System and Network Monitoring Software
+long_description ${description}
+homepage http://argus.tcp4me.com/
+platforms darwin
+master_sites http://www.tcp4me.com/code/argus-archive/
+checksums md5 7a946b17a61edeb1b455f2ab45acf77d
+distfiles argus-${version}.tgz
+worksrcdir argus-${version}
-patchfiles patch-Makefile.tplt
+depends_lib port:perl5.12 \
+ port:postfix \
+ port:openssl \
+ port:freetype \
+ port:gd2 \
+ port:fping \
+ port:db44 \
+ port:p5.12-dbi \
+ port:p5.12-berkeleydb \
+ port:p5.12-socket6 \
+ port:p5.12-gd \
+ port:p5.12-time-hires \
+ port:p5.12-net-ssleay \
+ port:p5.12-digest-hmac \
+ port:p5.12-digest-md5 \
+ port:p5.12-digest-sha1 \
+ port:p5.12-crypt-des
+patchfiles patch-Makefile.tplt
+
variant apple_postfix {
- depends_lib-delete port:postfix
+ depends_lib-delete port:postfix
}
-startupitem.create yes
-startupitem.name argusd
-startupitem.executable "${prefix}/sbin/argusd"
+startupitem.create yes
+startupitem.name argusd
+startupitem.executable \
+ "${prefix}/sbin/argusd"
# Set the --data_dir configure argument and give me a pointer to it for later reference.
-set argus_data_dir ${prefix}/var/argus-monitor
+set argus_data_dir ${prefix}/var/argus-monitor
# Set the Argus htdocs directory.
-set argus_htdocs ${prefix}/share/${name}/htdocs
+set argus_htdocs ${prefix}/share/${name}/htdocs
-configure.cmd ./Configure
-configure.args --bin_dir=${prefix}/bin \
- --sbin_dir=${prefix}/sbin \
- --lib_dir=${prefix}/lib/argus-monitor \
- --data_dir=${argus_data_dir} \
- --cgi_dir=${argus_htdocs}/cgi-bin
+configure.cmd ./Configure
+configure.args --bin_dir=${prefix}/bin \
+ --sbin_dir=${prefix}/sbin \
+ --lib_dir=${prefix}/lib/argus-monitor \
+ --data_dir=${argus_data_dir} \
+ --cgi_dir=${argus_htdocs}/cgi-bin
post-patch {
if { [variant_isset apple_postfix] } {
- reinplace "s|/lib/sendmail|/usr/sbin/sendmail|g" \
- ${worksrcpath}/examples/config
+ reinplace "s|/lib/sendmail|/usr/sbin/sendmail|g" \
+ ${worksrcpath}/examples/config
} else {
- reinplace "s|/lib/sendmail|${prefix}/sbin/sendmail|g" \
- ${worksrcpath}/examples/config
+ reinplace "s|/lib/sendmail|${prefix}/sbin/sendmail|g" \
+ ${worksrcpath}/examples/config
}
}
post-destroot {
- xinstall -m 755 -d ${destroot}${argus_htdocs}/sound
- xinstall -m 755 -d ${destroot}${argus_htdocs}/img
- xinstall -m 755 ${worksrcpath}/misc/whoopwhoop.wav ${destroot}${argus_htdocs}/sound
- eval xinstall -m 640 [glob ${worksrcpath}/misc/*.gif] ${destroot}${argus_htdocs}/img
- xinstall -m 644 -W ${worksrcpath}/misc argus.css argus.js \
- ${destroot}${argus_htdocs}
+ xinstall -m 755 -d ${destroot}${argus_htdocs}/sound
+ xinstall -m 755 -d ${destroot}${argus_htdocs}/img
+ xinstall -m 755 ${worksrcpath}/misc/whoopwhoop.wav ${destroot}${argus_htdocs}/sound
+ eval xinstall -m 640 [glob ${worksrcpath}/misc/*.gif] ${destroot}${argus_htdocs}/img
+ xinstall -m 644 -W ${worksrcpath}/misc argus.css argus.js \
+ ${destroot}${argus_htdocs}
- file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}
+ file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}
- system "chown -R www:www ${destroot}${argus_data_dir}"
- system "chown -R www:www ${destroot}${argus_htdocs}"
+ system "chown -R www:www ${destroot}${argus_data_dir}"
+ system "chown -R www:www ${destroot}${argus_htdocs}"
- destroot.keepdirs \
- ${destroot}${argus_data_dir}/gdata \
- ${destroot}${argus_data_dir}/perl \
- ${destroot}${argus_data_dir}/stats \
- ${destroot}${argus_data_dir}/html \
- ${destroot}${argus_data_dir}/notify
+ destroot.keepdirs \
+ ${destroot}${argus_data_dir}/gdata \
+ ${destroot}${argus_data_dir}/perl \
+ ${destroot}${argus_data_dir}/stats \
+ ${destroot}${argus_data_dir}/html \
+ ${destroot}${argus_data_dir}/notify
}
post-install {
@@ -95,7 +98,7 @@
-Uncomment the line:
AddHandler cgi-script .cgi
--Add a directive for the Argus data directory
+-Add a directive for the Argus data directory
ScriptAlias /argus \"${argus_htdocs}/cgi-bin/arguscgi\"
<Directory \"${argus_htdocs}/cgi-bin\">
@@ -106,20 +109,20 @@
2) Setup postfix so Argus can send mail via the command-line
----------------------------------------------
- cd ${prefix}/etc/postfix
- sudo cp master.cf.sample master.cf
- sudo cp main.cf.sample main.cf
- sudo cp aliases.sample aliases
+ cd ${prefix}/etc/postfix
+ sudo cp master.cf.sample master.cf
+ sudo cp main.cf.sample main.cf
+ sudo cp aliases.sample aliases
Redirect OS X's sendmail executable to the one from MacPorts.
- sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.old
- sudo ln -s ${prefix}/sbin/sendmail /usr/sbin/sendmail
+ sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.old
+ sudo ln -s ${prefix}/sbin/sendmail /usr/sbin/sendmail
Startup postfix and set it to run at sytem boot.
- sudo launchctl load -w /Library/LaunchDaemons/org.macports.postfix.plist
+ sudo launchctl load -w /Library/LaunchDaemons/org.macports.postfix.plist
Test postfix by sending a test email from a terminal window.
- mail joe at mycompany.com
+ mail joe at mycompany.com
NOTE: Make sure the SMTP server of the receiving domain will relay
mail from your Argus workstation.
@@ -134,8 +137,8 @@
3) Make the Argus files owned by the Apache user/group (default is \"www\")
----------------------------------------------
-Execute this terminal command:
- sudo chown -R <apache-user>:<apache-group> ${prefix}/share/${name}/
- sudo chown -R <apache-user>:<apache-group> ${argus_data_dir}/
+ sudo chown -R <apache-user>:<apache-group> ${prefix}/share/${name}/
+ sudo chown -R <apache-user>:<apache-group> ${argus_data_dir}/
4) Rename config.example and user.example to config and user and customize them.
@@ -148,52 +151,52 @@
So you may use service groups:
- Group \"WebServers\" {
- frequency: 5min
- retries: 5
- retrydelay: 10min
- notify: mail:netadmins at mycompany.com
+ Group \"WebServers\" {
+ frequency: 5min
+ retries: 5
+ retrydelay: 10min
+ notify: mail:netadmins at mycompany.com
- Host \"webserver.mycompany.com\" {
- Service TCP/HTTP
- Service TCP/HTTPS
- Service Ping
- }
+ Host \"webserver.mycompany.com\" {
+ Service TCP/HTTP
+ Service TCP/HTTPS
+ Service Ping
+ }
- Host \"webmail.mycompany.com\" {
- Service TCP/HTTP
- Service TCP/HTTPS
- Service TCP/POP
- Service TCP/POPS
- Service TCP/IMAP
- Service TCP/IMAPS
- Service TCP/SMTP
- Service TCP/SMTPS
- Service Ping
- Service UDP {
- port: 501
- }
+ Host \"webmail.mycompany.com\" {
+ Service TCP/HTTP
+ Service TCP/HTTPS
+ Service TCP/POP
+ Service TCP/POPS
+ Service TCP/IMAP
+ Service TCP/IMAPS
+ Service TCP/SMTP
+ Service TCP/SMTPS
+ Service Ping
+ Service UDP {
+ port: 501
+ }
- }
+ }
- Host \"dns1.mycompany.com\" {
- Service UDP/DNS
+ Host \"dns1.mycompany.com\" {
+ Service UDP/DNS
- }
- }
+ }
+ }
-Or you may use the \"shorthand\" notation and fully specify the characteristics
of individual hosts completely.
- Host \"www.example.com\" {
- Service TCP/HTTP
- Service TCP/HTTPS
- Service Ping
- Service TCP {
- port: 12345
- info: YoyoDyne Application Server
- }
- }
+ Host \"www.example.com\" {
+ Service TCP/HTTP
+ Service TCP/HTTPS
+ Service Ping
+ Service TCP {
+ port: 12345
+ info: YoyoDyne Application Server
+ }
+ }
NOTE: Unlike C or Perl, you cannot place the opening \{ on a different line,
and the closing \} must be on a line by itself (with optional whitespace).
@@ -205,19 +208,19 @@
----------------------------------------------
-Start argusd in the foreground to test it:
- sudo argusd -fd (foreground & debug)
+ sudo argusd -fd (foreground & debug)
-When you have argusd starting without errors, shutdown the foreground
processs using argusctl (or Control-C) and use launchctl to start argusd
in the background and set it to run at boot:
- argusctl shutdown
- sudo launchctl load -w /Library/LaunchDaemons/org.macports.argusd.plist
+ argusctl shutdown
+ sudo launchctl load -w /Library/LaunchDaemons/org.macports.argusd.plist
-NOTE: Config file changes are detected automatically by Argus within a few minutes,
but the impatient may use argusctl:
- argusctl hup
+ argusctl hup
5) Login to the Argus web interface to monitor your services.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141130/0f041427/attachment-0001.html>
More information about the macports-changes
mailing list