66 |
|
|
67 |
if [ ! -w "$docman2_realm" ] ; then |
if [ ! -w "$docman2_realm" ] ; then |
68 |
echo "FATAL: $docman2_realm is not writable by current user..." |
echo "FATAL: $docman2_realm is not writable by current user..." |
69 |
|
echo "(this is needed to create configuration files there)" |
70 |
exit 1 |
exit 1 |
71 |
fi |
fi |
72 |
|
|
73 |
|
if [ ! -w "$dir" -a ! -w "$dir/.html" ] ; then |
74 |
|
echo "FATAL: $dir is not writable by current user..." |
75 |
|
echo "(we needed to create new DocumentRoot dir $dir/.html; you can create" |
76 |
|
echo "$dir/.html directory writable to current user manually)" |
77 |
|
exit 1 |
78 |
|
fi |
79 |
|
|
80 |
|
|
81 |
# |
# |
82 |
# begin real move |
# begin real move |
83 |
# |
# |
123 |
f="$docman2_realm/$http_virtual_host.trustee" |
f="$docman2_realm/$http_virtual_host.trustee" |
124 |
echo "creating $f" |
echo "creating $f" |
125 |
cat $docman2_realm/localhost.trustee.dist > $f |
cat $docman2_realm/localhost.trustee.dist > $f |
126 |
|
# |
127 |
|
# add some permissions |
128 |
|
# |
129 |
|
echo "# |
130 |
|
# this will give all permissions to all users (to emulate docman 1.x |
131 |
|
# behaviour) -- you *WILL WANT* to change this! |
132 |
|
/:*:RWB |
133 |
|
#" >> $f |
134 |
|
|
135 |
# |
# |
136 |
# now, create new .html directory which will be DocumentRoot |
# now, create new .html directory which will be DocumentRoot |
154 |
read rm_old |
read rm_old |
155 |
if [ "$rm_old" = "y" -o -z "$rm_old" ] ; then |
if [ "$rm_old" = "y" -o -z "$rm_old" ] ; then |
156 |
rm $dir/$docman_php $dir/.docman.conf $dir/.htusers |
rm $dir/$docman_php $dir/.docman.conf $dir/.htusers |
157 |
|
else |
158 |
|
echo "remove files manually: $dir/$docman_php $dir/.docman.conf $dir/.htusers" |
159 |
fi |
fi |
160 |
echo "migration done..." |
echo "migration done..." |