updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / smartmon / smartmon_rc
blob3f1c9fd55f04edb6957339825dedd72e3b5826c3
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 # source application-specific settings
7 [ -f /etc/conf.d/smartmon ] && . /etc/conf.d/smartmon
9 case "$1" in
10 start)
11 stat_busy "Starting smartmon daemon..."
12 /usr/bin/smartmon -p /var/run/smartmon.pid -t $TIME -d $DEVICES -f /usr/share/smartmon/$SUSPEND_SCRIPT -w $WINDOWS &>/dev/null &
13 if [ $? -ne 0 ]; then
14 stat_fail
15 else
16 add_daemon smartmon
17 stat_done
20 stop)
21 stat_busy "Stoping smartmon daemon..."
22 kill `cat /var/run/smartmon.pid` &>/dev/null
23 rm_daemon smartmon
24 stat_done
27 echo "usage: $0 {start|stop}"
28 esac
29 exit 0