summaryrefslogtreecommitdiff
path: root/src/flufigut-client.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2012-10-16 02:43:30 +0200
committerChristian Pointner <equinox@spreadspace.org>2012-10-16 02:43:30 +0200
commit176d443bda49cee59aef1d5e54d7a92b7396e795 (patch)
tree53a05929575e300af35b606573a2257058518733 /src/flufigut-client.sh
parentflufigut clean works now (diff)
wipe works now
Diffstat (limited to 'src/flufigut-client.sh')
-rwxr-xr-xsrc/flufigut-client.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/flufigut-client.sh b/src/flufigut-client.sh
index e62a465..7cb0c54 100755
--- a/src/flufigut-client.sh
+++ b/src/flufigut-client.sh
@@ -64,8 +64,6 @@ if [ "install" = "$1" ]; then
fi
remove_instance() {
- type="$1"
- name="$2"
if [ "$1" = "worker" ]; then
sudo -u flumotion rm "$CONF_DIR/workers/$2.xml"
elif [ "$1" = "manager" ]; then
@@ -91,9 +89,8 @@ param=`echo $SSH_ORIGINAL_COMMAND | awk '{ print $2 }'`
case "$command" in
install)
- echo -n "install files from $param ... "
- cd $CONF_DIR
- sudo -u flumotion tar --strip-components=2 -xzf "$param"
+ echo -n "install files from '$param' ... "
+ sudo -u flumotion tar -C "$CONF_DIR" --strip-components=2 -xzf "$param"
rm "$param"
echo "done."
;;
@@ -106,6 +103,13 @@ case "$command" in
done
echo "ok."
;;
+ wipe)
+ echo -n "wiping files ... "
+ sudo -u flumotion rm "$CONF_DIR/workers/$param-"*.xml 2> /dev/null
+ sudo -u flumotion rm -rf "$CONF_DIR/managers/$param/" 2> /dev/null
+ sudo -u flumotion rm "$CONF_DIR/$param.passwd" 2> /dev/null
+ echo "done."
+ ;;
start)
echo -n "starting ... "
while read line; do