clarify use of mysql_fetch_array : use mysql_fetch_assoc or mysql_fetch_row
[diogenes.git] / config / make_dirs.sh
1 #!/bin/sh
2
3 # Introductory text
4 #
5 cat << EOF
6 This script will create the Diogenes spool and RCS directories
7 and set the permissions so that the directories are writable
8 by the web server.
9
10 You can cancel this script at any time using Ctrl-C.
11
12 EOF
13
14 echo -n "Where do you want the Diogenes RCS repository? [/var/lib/diogenes] "
15 read RCS_DIR
16 if [ "x$RCS_DIR" = "x" ]; then
17 RCS_DIR="/var/lib/diogenes"
18 fi
19
20 echo -n "Where do you want the Diogenes spool? [/var/spool/diogenes] "
21 read SPOOL_DIR
22 if [ "x$SPOOL_DIR" = "x" ]; then
23 SPOOL_DIR="/var/spool/diogenes"
24 fi
25
26 # Get the web server's group.
27 #
28 echo -n "Under what user does the web process run? [www-data] "
29 read OWNER
30 if [ "x$OWNER" = "x" ]; then
31 OWNER="www-data"
32 fi
33
34 # Create directories.
35 #
36 echo
37 echo -n "Creating directories... "
38 mkdir -p $RCS_DIR
39 mkdir -p $SPOOL_DIR
40 mkdir -p $SPOOL_DIR/templates_c
41 mkdir -p $SPOOL_DIR/diogenes_c
42 echo "done."
43
44 # Set ownership
45 #
46 echo
47 echo -n "Setting ownership recursively... "
48 chown -R $OWNER $RCS_DIR
49 chown -R $OWNER $SPOOL_DIR
50 echo "done."
51