summaryrefslogtreecommitdiff
path: root/createentities
blob: dbd8df712b091391840cc87fbe53ab3c6f69e4cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

GROUP="apache"

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

#
# Create config files
#
if test -f htdocs/config.php
then
	echo "htdocs/config.php already exists"
else
        echo "Creating htdocs/config.php"
	cp htdocs/config.php.defaults htdocs/config.php
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