HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   Creating optional folders (

SamTzu 28th October 2010 20:35

Creating optional folders
I noticed that it would actually be quite easy to have more similar 'Optional' folders like 'Own Error-Documents' folder. Just copy that same functionality in to maybe 5 other tabs that would have ISP defined optional files.

In /usr/local/ispconfig/server/plugins-available/ there is a line...
//** Copy the error documents on update when the error document checkbox has been activated and was deactivated before

This same functionality could be also adopted to more than just Error-Documents folder.

Example of folders I would like to see similar tabs for...


Option1 could have mediwiki files for instance (now the only thing missing would be an easy way to push DB for those files.) etc.

SamTzu 28th October 2010 21:27

Actually now that I think about this why not just keep it simple in the beginning and forget the DataBase part of this.

Those Optional folders could simply have installation files on them.

Optinal1 could have Joomla installation setup in it.
Optinal2 could have Drupal installation setup in it.
Optinal3 could have Mediawiki installation setup in it.

Then if the Site owner wanted to create Joomla site easily all they would have to do is mark the Optional1 tab under the 'Own Error-Documents' tab on their 'Site' page and voila the Joomla installation files would have been copied to a sub folder on their site.

till 28th October 2010 22:18

A application installer is already planned for one of the next releases.

SamTzu 28th October 2010 22:50

Good news.

SamTzu 28th October 2010 22:53

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


// 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

before all the lines.

All times are GMT +2. The time now is 11:42.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.