diff options
author | James Meyer <james.meyer@operamail.com> | 2008-11-07 05:03:57 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-11-07 05:03:57 (GMT) |
commit | 724988f9137cdcaf078d5e88e7efec9e664b638e (patch) | |
tree | 38cbc769c56b918f201f029ab1726f20e0cccdd8 /abs/extra-testing/smartmontools/smartd | |
parent | aeb48ca0a00c85d704294b81688f21075913f0a5 (diff) | |
download | linhes_pkgbuild-724988f9137cdcaf078d5e88e7efec9e664b638e.zip linhes_pkgbuild-724988f9137cdcaf078d5e88e7efec9e664b638e.tar.gz linhes_pkgbuild-724988f9137cdcaf078d5e88e7efec9e664b638e.tar.bz2 |
smarttools
Diffstat (limited to 'abs/extra-testing/smartmontools/smartd')
-rw-r--r-- | abs/extra-testing/smartmontools/smartd | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/abs/extra-testing/smartmontools/smartd b/abs/extra-testing/smartmontools/smartd new file mode 100644 index 0000000..5fcc414 --- /dev/null +++ b/abs/extra-testing/smartmontools/smartd @@ -0,0 +1,35 @@ +#!/bin/bash + + . /etc/rc.conf + . /etc/rc.d/functions + + case "$1" in + + start) + stat_busy "Starting smartd" + /usr/sbin/smartd &>/dev/null + if [ $? -ne 0 ]; then + stat_fail + else + add_daemon smartd + stat_done + fi + ;; + + stop) + stat_busy "Stopping smartd" + kill -9 `pidof /usr/sbin/smartd` &>/dev/null + rm_daemon smartd + stat_done + ;; + + restart) + stat_busy "Restarting smartd ..." + $0 stop + $0 start + stat_done + ;; + + *) + echo "usage: $0 {start|stop|restart}" + esac |