Commit 295a5aa7 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve cloned copying

parent 2d5afccc
...@@ -2,13 +2,19 @@ ...@@ -2,13 +2,19 @@
. ./config . ./config
#subst()
#{
# sed -i -e
#}
fix_phpconf() fix_phpconf()
{ {
local TO="$1" local TO="$1"
local PCD local PCD
for i in 5.5 5.4 5.3 ; do for i in 5.6 5.5 5.4 5.3 ; do
PCD="$TO/etc/php/$i/apache2-mod_php/php.ini" PCD="$TO/etc/php/$i/apache2-mod_php/php.ini"
if [ -r "$PCD" ] ; then if [ -r "$PCD" ] ; then
# broken on CentOS
subst "s|^memory_limit =.*|memory_limit = 386M|g" $PCD subst "s|^memory_limit =.*|memory_limit = 386M|g" $PCD
subst "s|^date.timezone =.*|date.timezone ='Europe/Moscow'|g" $PCD subst "s|^date.timezone =.*|date.timezone ='Europe/Moscow'|g" $PCD
break break
...@@ -26,15 +32,18 @@ TO=$ROOTSYS/$TOCONT ...@@ -26,15 +32,18 @@ TO=$ROOTSYS/$TOCONT
test -d "$TO" || return test -d "$TO" || return
echo
echo " =========== $TO ======== "
fix_phpconf $TO fix_phpconf $TO
rsync -av --progress --delete-after $FROM/etc/httpd2/conf/ $TO/etc/httpd2/conf/ rsync -a --progress --delete-after $FROM/etc/httpd2/conf/sites-enabled/ $TO/etc/httpd2/conf/sites-enabled/
rsync -av --progress --delete-after $FROM/etc/monitrc.d/ $TO/etc/monitrc.d/ rsync -a --progress --delete-after $FROM/etc/monitrc.d/ $TO/etc/monitrc.d/
rsync -av --progress --delete-after $FROM/etc/tcb/ $TO/etc/tcb/ rsync -a --progress --delete-after $FROM/etc/tcb/ $TO/etc/tcb/
rsync -av --progress --delete-after $FROM/etc/postfix/ $TO/etc/postfix/ rsync -a --progress --delete-after $FROM/etc/postfix/ $TO/etc/postfix/
for i in passwd shadow group monitrc httpd2/conf/mods-available/rpaf.conf ; do for i in passwd shadow group monitrc httpd2/conf/mods-available/rpaf.conf httpd2/conf/mods-available/remoteip.conf ; do
rsync -av --progress --delete-after $FROM/etc/$i $TO/etc/$i rsync -a --progress --delete-after $FROM/etc/$i $TO/etc/$i
done done
# reserve server # reserve server
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment