updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / djmount / djmount.rcd
blob84899dddbb8cc486ece93378760308d85c6e2aea
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 # source application-specific settings
7 [ -f /etc/conf.d/djmount ] && . /etc/conf.d/djmount
9 case "$1" in
11 start)
12 stat_busy "Starting djmount"
13 /usr/bin/djmount $OPTIONS $MOUNTPOINT &>/dev/null
14 if [ $? -ne 0 ]; then
15 stat_fail
16 else
17 add_daemon djmount
18 stat_done
22 stop)
23 stat_busy "Stopping djmount"
24 fusermount -u $MOUNTPOINT
25 kill -9 `pidof /usr/bin/djmount` &>/dev/null
26 rm_daemon djmount
27 stat_done
30 restart)
31 stat_busy "Restarting djmount ..."
32 $0 stop
33 $0 start
34 stat_done
38 echo "usage: $0 {start|stop|restart}"
39 esac