summaryrefslogtreecommitdiffstats
path: root/update_jdn.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update_jdn.sh')
-rwxr-xr-xupdate_jdn.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index 8bb24f1d..f24f9b64 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -123,12 +123,18 @@ if [ "$HOSTNAME" = "jenkins-test-vm" ] || [ "$HOSTNAME" = "profitbricks-build10-
sudo adduser jenkins libvirt-qemu
# we need a directory for the VM's storage pools
- VM_POOL_DIR=/srv/workspace/vm-pools
+ VM_POOL_DIR=/srv/lvc/vm-pools
if [ ! -d $VM_POOL_DIR ] ; then
- sudo mkdir $VM_POOL_DIR
+ sudo mkdir -p $VM_POOL_DIR
sudo chown jenkins:libvirt-qemu $VM_POOL_DIR
sudo chmod 775 $VM_POOL_DIR
fi
+
+ # tidy up after ourselves, for a while at least
+ OLD_VM_POOL_DIR=/srv/workspace/vm-pools
+ if [ -d "$OLD_VM_POOL_DIR" ] ; then
+ sudo rm -r "$OLD_VM_POOL_DIR"
+ fi
fi
# prepare tmpfs on some hosts