Added Mac OS X PackageBuilder scripts
authorAlexander Barton <alex@barton.de>
Mon, 14 Dec 2009 11:51:28 +0000 (12:51 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 14 Dec 2009 11:51:28 +0000 (12:51 +0100)
contrib/NagCollect.pmdoc/01nagcollect-contents.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/01nagcollect.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/02nagcollect-contents.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/02nagcollect.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/03tests-contents.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/03tests.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/04de-contents.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/04de.xml [new file with mode: 0644]
contrib/NagCollect.pmdoc/index.xml [new file with mode: 0644]
contrib/launch-osx.sh [new file with mode: 0755]
contrib/setup-osx.sh [new file with mode: 0755]

diff --git a/contrib/NagCollect.pmdoc/01nagcollect-contents.xml b/contrib/NagCollect.pmdoc/01nagcollect-contents.xml
new file mode 100644 (file)
index 0000000..bc1e5a7
--- /dev/null
@@ -0,0 +1 @@
+<pkg-contents spec="1.12"/>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/01nagcollect.xml b/contrib/NagCollect.pmdoc/01nagcollect.xml
new file mode 100644 (file)
index 0000000..135e38e
--- /dev/null
@@ -0,0 +1 @@
+<pkgref spec="1.12" uuid="52BF7228-3822-4088-A5D5-50E1E74CE63E"><config><identifier>de.barton.nagcollectClient.nagcollect.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true">../client/bin/nagcollect</installFrom><installTo mod="true">/usr/local/sbin</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>requireAuthorization</mod><mod>installTo</mod><mod>identifier</mod><mod>parent</mod><mod>version</mod><mod>installTo.path</mod><mod>extraFiles</mod><mod>installFrom.isRelativeType</mod></config><extra-files/></pkgref>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/02nagcollect-contents.xml b/contrib/NagCollect.pmdoc/02nagcollect-contents.xml
new file mode 100644 (file)
index 0000000..bc1e5a7
--- /dev/null
@@ -0,0 +1 @@
+<pkg-contents spec="1.12"/>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/02nagcollect.xml b/contrib/NagCollect.pmdoc/02nagcollect.xml
new file mode 100644 (file)
index 0000000..44a3776
--- /dev/null
@@ -0,0 +1 @@
+<pkgref spec="1.12" uuid="565E7308-1208-4EDA-B9DF-55221C3C23AC"><config><identifier>de.barton.nagcollectClient.conf.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true">../client/etc/nagcollect.conf</installFrom><installTo mod="true">/usr/local/etc</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>requireAuthorization</mod><mod>installTo</mod><mod>identifier</mod><mod>parent</mod><mod>version</mod><mod>installTo.path</mod><mod>extraFiles</mod><mod>installFrom.isRelativeType</mod></config><extra-files/></pkgref>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/03tests-contents.xml b/contrib/NagCollect.pmdoc/03tests-contents.xml
new file mode 100644 (file)
index 0000000..bc1e5a7
--- /dev/null
@@ -0,0 +1 @@
+<pkg-contents spec="1.12"/>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/03tests.xml b/contrib/NagCollect.pmdoc/03tests.xml
new file mode 100644 (file)
index 0000000..d2dbf02
--- /dev/null
@@ -0,0 +1 @@
+<pkgref spec="1.12" uuid="5E5B797D-D243-4A9B-BF6D-1BA29C6A2502"><config><identifier>de.barton.nagcollectClient.tests.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true">../client/lib/tests</installFrom><installTo mod="true">/usr/local/lib/nagcollect</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installFrom.isRelativeType</mod><mod>installTo</mod><mod>version</mod><mod>requireAuthorization</mod><mod>parent</mod><mod>includeRoot</mod><mod>identifier</mod><mod>extraFiles</mod><mod>installTo.path</mod></config><extra-files/></pkgref>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/04de-contents.xml b/contrib/NagCollect.pmdoc/04de-contents.xml
new file mode 100644 (file)
index 0000000..bc1e5a7
--- /dev/null
@@ -0,0 +1 @@
+<pkg-contents spec="1.12"/>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/04de.xml b/contrib/NagCollect.pmdoc/04de.xml
new file mode 100644 (file)
index 0000000..d69a8ae
--- /dev/null
@@ -0,0 +1 @@
+<pkgref spec="1.12" uuid="93FCFF65-282E-4131-B4AC-6FC1345FF6F8"><config><identifier>de.barton.nagcollectClient.launchscript.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true">../client/lib/de.barton.nagcollect</installFrom><installTo mod="true">/Library/LaunchDaemons</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>scripts.preinstall.path</mod><mod>scripts.postflight.path</mod><mod>installTo</mod><mod>scripts.postinstall.path</mod><mod>scripts.preflight.isRelativeType</mod><mod>installFrom.isRelativeType</mod><mod>scripts.postflight.isRelativeType</mod><mod>version</mod><mod>parent</mod><mod>scripts.preupgrade.path</mod><mod>identifier</mod><mod>scripts.postupgrade.path</mod><mod>requireAuthorization</mod><mod>scripts.preflight.path</mod><mod>extraFiles</mod><mod>installTo.path</mod></config><scripts><preinstall relative="true" mod="true">setup-osx.sh</preinstall><postinstall relative="true" mod="true">launch-osx.sh</postinstall><preupgrade relative="true" mod="true">setup-osx.sh</preupgrade><postupgrade relative="true" mod="true">launch-osx.sh</postupgrade></scripts><extra-files/></pkgref>
\ No newline at end of file
diff --git a/contrib/NagCollect.pmdoc/index.xml b/contrib/NagCollect.pmdoc/index.xml
new file mode 100644 (file)
index 0000000..5ea8dde
--- /dev/null
@@ -0,0 +1 @@
+<pkmkdoc spec="1.12"><properties><title>NagCollect Client</title><build>/Users/alex/Desktop/NagCollect Client.mpkg</build><organization>de.barton</organization><userSees ui="both"/><min-target os="2"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="NagCollect Scripts" id="choicenagcollect" starts_selected="true" starts_enabled="true" starts_hidden="false"><customLoc>/</customLoc><pkgref id="de.barton.nagcollectClient.nagcollect.pkg"/><pkgref id="de.barton.nagcollectClient.tests.pkg"/></choice><choice title="NagCollect Configuration" id="choiceconf" starts_selected="true" starts_enabled="true" starts_hidden="false"><customLoc>/</customLoc><pkgref id="de.barton.nagcollectClient.conf.pkg"/><choice-reqs><requirement id="filt" operator="eq" value="true" selected="yes" enabled="yes" hidden="unchanged" startSelected="unchanged" startEnabled="unchanged" startHidden="unchanged"><file>/usr/local/etc/nagcollect.conf</file></requirement></choice-reqs></choice><choice title="NagCollect Service Script" id="choicelaunch" starts_selected="true" starts_enabled="true" starts_hidden="false"><customLoc>/</customLoc><pkgref id="de.barton.nagcollectClient.launchscript.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="de"/></resources><flags/><extra-files/><item type="file">01nagcollect.xml</item><item type="file">02nagcollect.xml</item><item type="file">03tests.xml</item><item type="file">04de.xml</item><mod>properties.systemDomain</mod><mod>properties.title</mod><mod>properties.customizeOption</mod><mod>properties.anywhereDomain</mod><mod>extraFiles</mod></pkmkdoc>
\ No newline at end of file
diff --git a/contrib/launch-osx.sh b/contrib/launch-osx.sh
new file mode 100755 (executable)
index 0000000..dd75800
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# NagCollect -- Nagios Data Collector for Passive Checks
+# Copyright (c)2009 Alexander Barton, alex@barton.de
+#
+logger -t "launch-osx.sh" -s "starting ..."
+[ -r /usr/local/etc/nagcollect.conf ] && . /usr/local/etc/nagcollect.conf
+if [ -n "$SERVER_URL" -a -n "$CLIENT_KEY" -a -n "$CLIENT_ID" ]; then
+       logger -t "launch-osx.sh" -s "Configuration valid, loading LaunchDaemon script ..."
+       launchctl load -w /Library/LaunchDaemons/de.barton.nagcollect
+else
+       logger -t "launch-osx.sh" -s "Configuration not valid, NOT LOADING LaunchDaemon script!"
+fi
+logger -t "launch-osx.sh" -s "done."
diff --git a/contrib/setup-osx.sh b/contrib/setup-osx.sh
new file mode 100755 (executable)
index 0000000..98db928
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# NagCollect -- Nagios Data Collector for Passive Checks
+# Copyright (c)2009 Alexander Barton, alex@barton.de
+#
+logger -t "setup-osx.sh" -s "starting ..."
+[ -r /Library/LaunchDaemons/de.barton.nagcollect ] \
+       && launchctl unload -w /Library/LaunchDaemons/de.barton.nagcollect
+logger -t "setup-osx.sh" -s "done."