Scripts to bootstrap a development domtool environment
[hcoop/domtool2.git] / bootstrap / domtool-create-shared-root
diff --git a/bootstrap/domtool-create-shared-root b/bootstrap/domtool-create-shared-root
new file mode 100755 (executable)
index 0000000..ba0ebbf
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Create shared directories, set permissions
+
+SHAREDROOT=`../bin/domtool-config -path shared-root`
+
+if [ -z "$SHAREDROOT" ]; then
+    echo "shared-root not set, domtool not built?"
+    exit 1
+fi
+
+function if_afs () {
+    if [[ $SHAREDROOT == /afs/* ]]; then
+       $*
+    fi
+}
+
+if_afs echo "AFS in use. This will not work correctly."
+
+set -x
+
+mkdir -p $SHAREDROOT
+
+for d in backup certs email firewall keys lib logs nodes nodes.old serials webalizer; do
+    mkdir $SHAREDROOT/$d
+done
+
+touch $SHAREDROOT/firewall/user.rules
+