summaryrefslogtreecommitdiff
path: root/createentities.sh
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2011-11-01 11:08:11 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2011-11-01 11:08:11 +0100
commitfdfe9c5ce2f503938b1818bc66544b1978bfdc05 (patch)
treed99f0a3e4edca7598336b838cda3340d570bd083 /createentities.sh
parent42c62cb041a2b2b95c9cda0c20fcf70334fd244c (diff)
Rename to .sh
Diffstat (limited to 'createentities.sh')
-rwxr-xr-xcreateentities.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/createentities.sh b/createentities.sh
new file mode 100755
index 0000000..1c3fbba
--- /dev/null
+++ b/createentities.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+GROUP="apache"
+
+#
+# Create user file
+#
+if test -f data/users.xml
+then
+ echo "data/users.xml already exists."
+else
+ echo "Creating data/users.xml with the user 'admin' password: 'executioncms'. Please log in and change this..."
+ echo "<?xml version='1.0' encoding='UTF-8'?>" > data/users.xml
+ echo "<users>" >> data/users.xml
+ echo " <user userid='admin' password='8456c0209aaa9ca04730a3160caf6e5e6b5ea389'/>" >> data/users.xml
+ echo "</users>" >> data/users.xml
+ chgrp $GROUP data/users.xml
+ chmod g+wr data/users.xml
+fi
+
+if test -f forum/htdocs/config.php
+then
+ echo "forum/htdocs/config.php already exists"
+else
+ echo "Creating forum/htdocs/config.php"
+ cp forum/htdocs/config.php.defaults forum/htdocs/config.php
+fi
+
+#
+# Create symlink to forum
+#
+if test -L htdocs/forum
+then
+ echo "htdocs/forum symlink already exists"
+else
+ echo "Creating htdocs/forum symlink"
+ (cd htdocs; ln ../forum/htdocs forum -s)
+fi