fix pac-domain migration

This commit is contained in:
Peter Hormanns 2012-10-18 17:13:59 +02:00
commit 3a348a1dbb

View File

@ -392,18 +392,20 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
} }
processor.appendProcessor( processor.appendProcessor(
new ShellProcessor("test -L " + domDir + "/htdocs" + new ShellProcessor("test -L " + domDir + "/htdocs" +
" && `stat -c '%N' " + domDir + "/htdocs |sed -e\"s/[\\`']//g\" |cut -d ' ' -f 3` = web-ssl " + " && $( stat -c '%N' " + domDir + "/htdocs |sed -e\"s/[\\`']//g\" |cut -d ' ' -f 3 ) = web-ssl " +
" && cd " + domDir + " && cd " + domDir +
" && rm " + domDir + "/htdocs" + " && rm " + domDir + "/htdocs" +
" && ln -sf htdocs-ssl htdocs" + " && ln -sf htdocs-ssl htdocs" +
" && chown -h " + pacName + ":" + pacName + " " + domDir + "/htdocs")); " && chown -h " + pacName + ":" + pacName + " " + domDir + "/htdocs" +
" || echo 'link htdocs not found'"));
processor.appendProcessor( processor.appendProcessor(
new ShellProcessor("test -L " + domDir + "/htdocs-ssl" + new ShellProcessor("test -L " + domDir + "/htdocs-ssl" +
" && `stat -c '%N' " + domDir + "/htdocs-ssl |sed -e\"s/[\\`']//g\" |cut -d ' ' -f 3` = web " + " && $( stat -c '%N' " + domDir + "/htdocs-ssl |sed -e\"s/[\\`']//g\" |cut -d ' ' -f 3 ) = web " +
" && cd " + domDir + " && cd " + domDir +
" && rm " + domDir + "/htdocs-ssl" + " && rm " + domDir + "/htdocs-ssl" +
" && ln -sf htdocs htdocs-ssl" + " && ln -sf htdocs htdocs-ssl" +
" && chown -h " + pacName + ":" + pacName + " " + domDir + "/htdocs-ssl")); " && chown -h " + pacName + ":" + pacName + " " + domDir + "/htdocs-ssl" +
" || echo 'link htdocs-ssl not found'"));
return processor; return processor;
} }