florian 4b2601d406 Add smartmontools (#1066)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@5907 3c298f89-4303-0410-b956-a3cf2f4a3e73
2006-12-27 19:08:15 +00:00

29 lines
450 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=95
start() {
[ -f /etc/smartd.conf ] || {
echo "/etc/smartd.conf does not exist !";
exit 0;
};
[ -d /var/run ] || mkdir -p /var/run
[ -x /usr/sbin/smartd ] && /usr/sbin/smartd -q never -p /var/run/smartd.pid
}
stop() {
killall smartd
}
restart() {
stop
sleep 1
start
}
reload() {
kill -HUP `cat /var/run/smartd.pid` &>/dev/null
}