summaryrefslogtreecommitdiffstats
path: root/provision_apache.module
diff options
context:
space:
mode:
authorAdrian Rossouw2008-01-19 20:27:21 (GMT)
committeradrian2008-01-19 20:27:21 (GMT)
commit63b79693788d9cf4f276d62bb211e4ffa4b8ca7c (patch)
tree51d58703cc59ce662dd33b00bdac8a64deae4cf4 /provision_apache.module
parentfb36e66dcfba2231b931a1c010a7c71a1c259982 (diff)
Extensive inline documentation through the magic of hook_help. Documents the requirements for each of the component modules and all the commands and options that can be passed to it on the command line
Diffstat (limited to 'provision_apache.module')
-rw-r--r--provision_apache.module21
1 files changed, 21 insertions, 0 deletions
diff --git a/provision_apache.module b/provision_apache.module
index 5349c01..589700b 100644
--- a/provision_apache.module
+++ b/provision_apache.module
@@ -15,6 +15,22 @@ function provision_apache_provision_service() {
}
/**
+ * Implementation of hook_help().
+ */
+function provision_apache_help($section) {
+ switch ($section) {
+ case 'admin/help/provision#requirements':
+ $output .= "<ol>";
+ $output .= '<li>' . t('<strong>The user account running the script, and the group of the httpd daemon.</strong> The provision framework takes special care to make sure that the file permissions of the hosted sites are always as safe as can be, especially to make sure that the web server does not have the ability to modify the code of the site, therefor this information is required to assure that safety while keeping the sites accessible.') . '</li>';
+ $output .= '<li>' . t('<strong>Access to the server\'s <code>httpd.conf</code> file.</strong> You are required to add a single line to the httpd.conf file, which allows the system to load the additional virtual hosts that are generated.') . '</li>';
+ $output .= '<li>' . t('<strong>Ability to reload the httpd daemon.</strong> As the provisioning framework should <strong>never</strong> be run as root, and the web server group should <strong>never</strong> be allowed access to the functionality to stop/start the web server, it is required that you provide access to the Apache restart command for the user account the script will be running as. If this is not configured, every command will ask for a sudo password when restarting the server.') . '</li>';
+ $output .= "</ol>";
+ return $output;
+ break;
+ }
+}
+
+/**
* Hook into central configuration form for provisioning framework.
*/
function provision_apache_provision_configure() {
@@ -76,6 +92,11 @@ function provision_apache_provision_enable($url, &$data) {
_provision_apache_restart_apache();
}
+function provision_apache_provision_disable($url, &$data) {
+ _provision_apache_delete_vhost_config($url, $data);
+ _provision_apache_restart_apache();
+}
+
function provision_apache_provision_regenerate($url, &$data) {
_provision_apache_create_vhost_config($url, $data);
_provision_apache_restart_apache();