Scripts to bootstrap a development domtool environment
[hcoop/domtool2.git] / bootstrap / domtool-create-local-root
diff --git a/bootstrap/domtool-create-local-root b/bootstrap/domtool-create-local-root
new file mode 100755 (executable)
index 0000000..e566f06
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# ideally: domtool-create-local-root service+
+# service = bind, apache, exim, courier, etc.
+# actually: domtool-create-local-root -> every possible service dir is created
+
+LOCALROOT=`domtool-config -path local-root`
+
+if [ -z "$LOCALROOT" ]; then
+    echo "ERROR: local root not set. Domtool not built?"
+    exit 1
+fi
+
+set -x
+
+mkdir -p $LOCALROOT
+
+for d in firewall vhosts zones; do
+    mkdir $LOCALROOT/$d
+done
+
+# domtool probably ought to ensure directories exist, since the
+# services configured by a worker are set statically. It makes little
+# sense for a worker to advertise that it can configure a service, and
+# not actually be able to do so.
+