summaryrefslogtreecommitdiff
path: root/createentities
diff options
context:
space:
mode:
authordeva <deva>2008-10-11 19:15:10 +0000
committerdeva <deva>2008-10-11 19:15:10 +0000
commit770a98fa4989a29622215312697c517aaf3cdd59 (patch)
tree48afbb4c778d9191a1b48c839eb7c53dd28e93d1 /createentities
parentd9285643a9725ccce5fdbdfff3205a6aa074c459 (diff)
Made users class create the default users.xml, when users.xml doesn't exist instead of createentities.
Diffstat (limited to 'createentities')
-rwxr-xr-xcreateentities26
1 files changed, 4 insertions, 22 deletions
diff --git a/createentities b/createentities
index db9845d..6b6c775 100755
--- a/createentities
+++ b/createentities
@@ -3,21 +3,8 @@
GROUP="apache"
#
-# Create user files
+# Create user file
#
-if test -f forum/data/users.xml
-then
- echo "forum/data/users.xml already exists."
-else
- echo "Creating forum/data/users.xml"
- echo "<?xml version='1.0' encoding='UTF-8'?>" > forum/data/users.xml
- echo "<users>" >> forum/data/users.xml
- echo " <user enabled='on' uid='0' gid='0' notified='0' username='admin' password='8456c0209aaa9ca04730a3160caf6e5e6b5ea389' name='Administrator' avatar='default.gif' email=''/>" >> forum/data/users.xml
- echo "</users>" >> forum/data/users.xml
- chgrp $GROUP forum/data/users.xml
- chmod g+wr forum/data/users.xml
-fi
-
if test -f data/users.xml
then
echo "data/users.xml already exists."
@@ -65,20 +52,15 @@ fi
#
-# Create a forum
+# Create a forum storage dir
#
if test -d forum/data/forum
then
echo "forum/data/forum already exists"
else
mkdir forum/data/forum
- echo "<?xml version='1.0' encoding='UTF-8'?>" > forum/data/forum/forums.xml
- echo "<forums>" >> forum/data/forum/forums.xml
- echo " <forum fid='1' readlist='1' writelist='1' name='Test Forum'/>" >> forum/data/forum/forums.xml
- echo "</forums>" >> forum/data/forum/forums.xml
- mkdir forum/data/forum/1
- chgrp $GROUP forum/data/forum/1
- chmod g+w forum/data/forum/1
+ chgrp $GROUP forum/data/forum
+ chmod g+w forum/data/forum
fi
#