View Single Post
  #5  
Old 28th October 2010, 21:53
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 429
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default

For those who don't want to wait here is how you can copy whole folder to a new 'Site'.

Quote:
// copy the standard index page
if (file_exists("/usr/local/ispconfig/server/conf-custom/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2))){
exec("cp /usr/local/ispconfig/server/conf-custom/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2)." ".escapeshellcmd($data["new"]["document_root"])."/web/index.html");

}
else {
if (file_exists("/usr/local/ispconfig/server/conf-custom/index/standard_index.html")){
exec("cp /usr/local/ispconfig/server/conf-custom/index/standard_index.html ".escapeshellcmd($data["new"]["document_root"])."/web/index.html");
}
else {
// exec("cp /usr/local/ispconfig/server/conf/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2)." ".escapeshellcmd($data["new"]["document_root"])."/web/index.html");
exec("cp /usr/local/ispconfig/server/conf/index/favicon.ico ".escapeshellcmd($data["new"]["document_root"])."/web/");
exec("cp /usr/local/ispconfig/server/conf/index/robots.txt ".escapeshellcmd($data["new"]["document_root"])."/web/");
exec("cp /usr/local/ispconfig/server/conf/index/.htaccess ".escapeshellcmd($data["new"]["document_root"])."/web/");
exec("cp -R /var/www/COPY-THIS-FOLDER-TO-NEW-SITE/web/* ".escapeshellcmd($data["new"]["document_root"])."/web/");

}
}
exec("chmod -R a+r ".escapeshellcmd($data["new"]["document_root"])."/web/");

Edit: Seems to look a bit different in the latest 3.0.3 version.
There is
Quote:
if(is_file('/usr/local/ispconfig/server/conf/index/
before all the lines.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 28th October 2010 at 22:06.
Reply With Quote