aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2013-08-22 15:05:50 +0200
committerHeiko Bernloehr <Heiko.Bernloehr@FreeIT.de>2013-08-22 15:09:22 +0200
commit561be6974dc030309a2165726c5b4ff3f0afba2d (patch)
treeca34864f981e7593ec2450f472c704159cd8b903
parent98b6fa4676a1ff847eb3968c885a4feac22b8086 (diff)
downloadecs2-561be6974dc030309a2165726c5b4ff3f0afba2d.tar.gz
ecs2-561be6974dc030309a2165726c5b4ff3f0afba2d.zip
Fixed deleting whole resources in participants.sh .
E.g. you could call: participant.sh delete /campusconnect/course_members to delete iall messages in /campusconnect/course_members .
-rwxr-xr-xcampusconnect/scripts/participant.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/campusconnect/scripts/participant.sh b/campusconnect/scripts/participant.sh
index 297e687..d3b920b 100755
--- a/campusconnect/scripts/participant.sh
+++ b/campusconnect/scripts/participant.sh
@@ -137,11 +137,12 @@ elif [ "x$rid" = "xfifo" -a "x$namespace" = "xsys" ]; then
cmd="curl $CURL_OPTIONS --cacert $CACERT --cert $CERT --key $KEY --pass $PASS \
-X POST ${ECS_URL}$1 $REDIRECT_IO"
eval $cmd
+elif [ "x$namespace" = "xsys" -a "x$resourcename" = "xevents" -a "x$rid" = "x" ]; then
+ echo "To delete all events, please see command help: \"participants.sh -h\""
elif [ "x`echo $rid | grep '^[0-9]\+$'`" = "x" -a "x$namespace" != "x" -a "x$resourcename" != "x" ]; then
curl_options="$CURL_OPTIONS"
CURL_OPTIONS=
- list=`get /$namespace/$resourcename`
- CURL_OPTIONS=$curl_options
+ list=`curl -k --cacert $CACERT --cert $CERT --key $KEY --pass $PASS ${ECS_URL}/$namespace/$resourcename 2>/dev/null`
for i in $list; do
echo Deleting resource representation \"/$namespace/$i\" ...
delete "/$namespace/$i"