[Packages] Fix init script props
[packages.git] / utils / smartmontools / files / smartd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3
4 START=95
5 start() {
6   [ -f /etc/smartd.conf ] || {
7     echo "/etc/smartd.conf does not exist !";
8     exit 0;
9   };
10   [ -d /var/run ] || mkdir -p /var/run
11   [ -x /usr/sbin/smartd ] && /usr/sbin/smartd -q never -p /var/run/smartd.pid
12 }
13
14 stop() {
15   killall smartd
16 }
17
18 restart() {
19         stop
20         sleep 1
21         start
22 }
23
24 reload() {
25         kill -HUP `cat /var/run/smartd.pid` &>/dev/null
26 }
27
28