summaryrefslogtreecommitdiff
path: root/public-images
diff options
context:
space:
mode:
Diffstat (limited to 'public-images')
-rwxr-xr-xpublic-images18
1 files changed, 18 insertions, 0 deletions
diff --git a/public-images b/public-images
new file mode 100755
index 0000000..3776212
--- /dev/null
+++ b/public-images
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# change backed up images to be public
+
+#glance image-list | awk '{ ID[$2]++; } END{ for (var in ID) system("glance image-update --is-public True print var}'
+
+#glance image-list >/tmp/image-list
+
+#sleep 3
+while read -r LINE
+do
+ ID=$(echo $LINE | awk '{print $2}');
+ if echo $LINE | grep -q 'active'
+ then glance image-update --is-public True $ID;
+ fi
+done </tmp/image-list
+
+#rm /tmp/image-list