summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@krebs>2011-08-04 02:32:37 +0200
committerroot <root@krebs>2011-08-04 02:32:37 +0200
commit1af1a0d5634df838d58aeec32905ef8208811fa2 (patch)
tree78ade228e574ae986694c690ca3dabc9bcca26c9
parente1906bc19ef725fe08a11e7722e5505b74014867 (diff)
added help for streams tool
-rwxr-xr-xstreams/streams28
1 files changed, 26 insertions, 2 deletions
diff --git a/streams/streams b/streams/streams
index a8408b4a..eb1e6674 100755
--- a/streams/streams
+++ b/streams/streams
@@ -2,6 +2,11 @@
HERE=$(dirname $(readlink -f $0))
URLS=`cat $HERE/stream.db`
+#if [ ! `id -u` -eq "0" ]; then
+# echo "we are going sudo..."
+# exec sudo "$0" "$@"
+#fi
+
function start() {
# start the given stream von $1
REQ=$1
@@ -43,7 +48,23 @@ function list()
}
-
+function shorthelp()
+{
+ echo "start|stop|restart|status|list [audio stream]"
+}
+function longhelp()
+{
+ B=`basename $0`
+ echo -n "Usage: $B "
+ shorthelp
+ echo " get all available streams with '/$B list'
+Examples:
+ $B list
+ $B start groove
+ $B restart deepmix
+ $B status
+ $B stop"
+}
case "$1" in
@@ -69,7 +90,10 @@ case "$1" in
list)
list
;;
+ (--help)
+ shorthelp
+ ;;
*)
- echo "aidsballs"
+ longhelp
;;
esac