summaryrefslogtreecommitdiffstats
path: root/os_darwin
diff options
context:
space:
mode:
Diffstat (limited to 'os_darwin')
-rw-r--r--os_darwin/com.smartmontools.smartd.plist.in20
-rw-r--r--os_darwin/pkg/Distribution.in21
-rw-r--r--os_darwin/pkg/PackageInfo.in6
-rw-r--r--os_darwin/pkg/installer/README.html26
-rwxr-xr-xos_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall40
5 files changed, 113 insertions, 0 deletions
diff --git a/os_darwin/com.smartmontools.smartd.plist.in b/os_darwin/com.smartmontools.smartd.plist.in
new file mode 100644
index 0000000..c025e45
--- /dev/null
+++ b/os_darwin/com.smartmontools.smartd.plist.in
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>KeepAlive</key>
+ <dict>
+ <key>SuccessfulExit</key>
+ <false/>
+ </dict>
+ <key>Label</key>
+ <string>com.smartmontools.smartd</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/usr/local/sbin/smartd</string>
+ <string>-n</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ </dict>
+</plist>
diff --git a/os_darwin/pkg/Distribution.in b/os_darwin/pkg/Distribution.in
new file mode 100644
index 0000000..df3ec9c
--- /dev/null
+++ b/os_darwin/pkg/Distribution.in
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<installer-gui-script minSpecVersion="2">
+ <allowed-os-versions>
+ <os-version min="10.5"/>
+ </allowed-os-versions>
+ <license file="license.txt" mime-type="text/plain"/>
+ <!-- <welcome file="welcome.rtf" mime-type="text/rtf"/> -->
+ <title>S.M.A.R.T. disk monitoring tools</title>
+ <pkg-ref id="com.smartmontools.pkg"/>
+ <choices-outline>
+ <line choice="default">
+ <line choice="com.smartmontools.pkg"/>
+ </line>
+ </choices-outline>
+ <choice id="default"/>
+ <choice id="com.smartmontools.pkg" visible="false">
+ <pkg-ref version="@version@" installKBytes="@size@" id="com.smartmontools.pkg">@pkgname@</pkg-ref>
+ </choice>
+ <domains enable_localSystem="true"/>
+ <options customize="never" rootVolumeOnly="true"/>
+</installer-gui-script>
diff --git a/os_darwin/pkg/PackageInfo.in b/os_darwin/pkg/PackageInfo.in
new file mode 100644
index 0000000..92ea7a2
--- /dev/null
+++ b/os_darwin/pkg/PackageInfo.in
@@ -0,0 +1,6 @@
+<pkg-info format-version="2" identifier="com.smartmontools.pkg" version="@version@" install-location="/" auth="root">
+<payload installKBytes="@size@" numberOfFiles="@files@"/>
+<!-- <scripts>
+ <postinstall file="./postinstall"/>
+</scripts> -->
+</pkg-info>
diff --git a/os_darwin/pkg/installer/README.html b/os_darwin/pkg/installer/README.html
new file mode 100644
index 0000000..6abdc80
--- /dev/null
+++ b/os_darwin/pkg/installer/README.html
@@ -0,0 +1,26 @@
+<html>
+<body>
+<h2>About this package</h2>
+The smartmontools package contains two utility programs (smartctl and smartd) to control
+and monitor storage systems using the Self-Monitoring, Analysis and Reporting
+Technology System (SMART) built into most modern ATA and SCSI harddisks.
+In many cases, these utilities will provide advanced warning of disk degradation and failure.
+<h2>Installing</h2>
+To install package click on the smartmontools.pkg icon and follow installation process. Files will be installed to the <b>/usr/local/</b> directory.
+<h2>Usage</h2>
+ If you are having trouble understanding the output of smartctl or smartd, please first read the manual pages installed on your system:
+<pre>
+ man 8 smartctl
+ man 8 smartd
+ man 8 update-smart-drivedb
+ man 5 smartd.conf
+</pre>
+To use smartmontools with USB drives please download and install
+<a href="https://github.com/kasbert/OS-X-SAT-SMART-Driver">Max OS X kernel driver for providing access to external drive SMART data</a>. SAT SMART Driver is a free open source project (published under Apple Public Source License) by Jarkko Sonninen.
+If you are using OS X El Capitan 10.11+ it is recommended to use signed version available from <a href="http://binaryfruit.com/drivedx/usb-drive-support/">DriveDx web site</a>.
+<p>
+More information could be found on the <a href="https://www.smartmontools.org">www.smartmontools.org</a> website.
+<h2>Uninstalling</h2>
+If you want to uninstall already installed package run <tt>'sudo smart-pkg-uninstall'</tt> in the terminal.
+</body>
+</html>
diff --git a/os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall b/os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall
new file mode 100755
index 0000000..72bb3fa
--- /dev/null
+++ b/os_darwin/pkg/root/usr/local/sbin/smart-pkg-uninstall
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+echo "Smartmontools package uninstaller:"
+
+# check if we are running with root uid
+if [[ $EUID -ne 0 ]]; then
+ echo " Error: this script must be run as root"
+ exit 1
+fi
+
+# check if package is installed
+pkgutil --info com.smartmontools.pkg > /dev/null 2>/dev/null
+if [ $? -ne 0 ]; then
+ echo " Error: smartmontools package is not installed"
+ exit 1
+fi
+
+# smartmontools pkg could be installed only on system volume, so this should be safe
+cd /
+
+echo " - removing files"
+for str in `pkgutil --files com.smartmontools.pkg`
+do
+ if [ -f "$str" ]
+ then
+ rm -f "$str"
+ fi
+done
+echo " - removing empty directories"
+for str in `pkgutil --files com.smartmontools.pkg`
+do
+ if [ -d "$str" ]
+ then
+ rmdir -p "$str" 2>/dev/null
+ fi
+done
+
+echo " - removing package system entry"
+pkgutil --forget com.smartmontools.pkg
+echo "Done, smartmontolls package removed"