summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/djmount/djmount.rcd
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-03-23 17:56:01 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-03-23 17:56:01 (GMT)
commit03a1a4555589eecf2f4c58e128f6b9f6760fa0fd (patch)
treec65aba730e804fe07cc2a6636336c6ae1aef8203 /abs/extra-testing/community/djmount/djmount.rcd
parent286c64a9a729bef4412e6f743c49adbbc28593fb (diff)
parent7f9313d1860b96caf5b0c70e88d153d2c4515e0a (diff)
downloadlinhes_pkgbuild-03a1a4555589eecf2f4c58e128f6b9f6760fa0fd.zip
linhes_pkgbuild-03a1a4555589eecf2f4c58e128f6b9f6760fa0fd.tar.gz
linhes_pkgbuild-03a1a4555589eecf2f4c58e128f6b9f6760fa0fd.tar.bz2
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/extra-testing/community/djmount/djmount.rcd')
-rwxr-xr-xabs/extra-testing/community/djmount/djmount.rcd39
1 files changed, 39 insertions, 0 deletions
diff --git a/abs/extra-testing/community/djmount/djmount.rcd b/abs/extra-testing/community/djmount/djmount.rcd
new file mode 100755
index 0000000..84899dd
--- /dev/null
+++ b/abs/extra-testing/community/djmount/djmount.rcd
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+ . /etc/rc.conf
+ . /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/djmount ] && . /etc/conf.d/djmount
+
+ case "$1" in
+
+ start)
+ stat_busy "Starting djmount"
+ /usr/bin/djmount $OPTIONS $MOUNTPOINT &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ add_daemon djmount
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping djmount"
+ fusermount -u $MOUNTPOINT
+ kill -9 `pidof /usr/bin/djmount` &>/dev/null
+ rm_daemon djmount
+ stat_done
+ ;;
+
+ restart)
+ stat_busy "Restarting djmount ..."
+ $0 stop
+ $0 start
+ stat_done
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+ esac