--- migrate.sh 2003/06/11 02:32:13 1.1 +++ migrate.sh 2003/06/11 02:54:44 1.2 @@ -66,9 +66,18 @@ if [ ! -w "$docman2_realm" ] ; then echo "FATAL: $docman2_realm is not writable by current user..." + echo "(this is needed to create configuration files there)" exit 1 fi +if [ ! -w "$dir" -a ! -w "$dir/.html" ] ; then + echo "FATAL: $dir is not writable by current user..." + echo "(we needed to create new DocumentRoot dir $dir/.html; you can create" + echo "$dir/.html directory writable to current user manually)" + exit 1 +fi + + # # begin real move # @@ -114,6 +123,14 @@ f="$docman2_realm/$http_virtual_host.trustee" echo "creating $f" cat $docman2_realm/localhost.trustee.dist > $f +# +# add some permissions +# +echo "# +# this will give all permissions to all users (to emulate docman 1.x +# behaviour) -- you *WILL WANT* to change this! +/:*:RWB +#" >> $f # # now, create new .html directory which will be DocumentRoot @@ -137,5 +154,7 @@ read rm_old if [ "$rm_old" = "y" -o -z "$rm_old" ] ; then rm $dir/$docman_php $dir/.docman.conf $dir/.htusers +else + echo "remove files manually: $dir/$docman_php $dir/.docman.conf $dir/.htusers" fi echo "migration done..."