add apache restart command after enabling modules in config-templates

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p) 2018-02-17 14:51:04 +01:00
parent 350e3d733a
commit fd287e7be4
6 changed files with 62 additions and 2 deletions

View File

@ -316,7 +316,7 @@ class Action
case "file":
if (array_key_exists('content', $action)) {
CmdLineHandler::printwarn("Creating file '" . $action['name'] . "'");
file_put_contents($action['name'], strtr($action['content'], $replace_arr));
file_put_contents($action['name'], trim(strtr($action['content'], $replace_arr)));
} elseif (array_key_exists('subcommands', $action)) {
foreach ($action['subcommands'] as $fileaction) {
if (array_key_exists('execute', $fileaction) && $fileaction['execute'] == "pre") {
@ -325,7 +325,7 @@ class Action
exec(strtr($fileaction['content'], $replace_arr));
} elseif ($fileaction['type'] == 'file') {
CmdLineHandler::printwarn("Creating file '" . $fileaction['name'] . "'");
file_put_contents($fileaction['name'], strtr($fileaction['content'], $replace_arr));
file_put_contents($fileaction['name'], trim(strtr($fileaction['content'], $replace_arr)));
}
}
}

View File

@ -48,6 +48,11 @@
<include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command>
<command><![CDATA[a2enmod headers]]></command>
<command>
<visibility mode="true">{{settings.system.use_ssl}}
</visibility>
<content><![CDATA[a2enmod ssl]]></content>
</command>
<command>
<visibility mode="true">{{settings.phpfpm.enabled}}
</visibility>
@ -4753,6 +4758,11 @@ aliases: files
</visibility>
<command><![CDATA[a2dismod php5]]></command>
</commands>
<commands index="5">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
</commands>
<!-- instead of just restarting apache, we let the cronjob do all the
dirty work -->
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>

View File

@ -49,6 +49,11 @@
<include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command>
<command><![CDATA[a2enmod headers]]></command>
<command>
<visibility mode="true">{{settings.system.use_ssl}}
</visibility>
<content><![CDATA[a2enmod ssl]]></content>
</command>
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
<visibility mode="true">{{settings.phpfpm.enabled}}
</visibility>
@ -1752,6 +1757,11 @@ aliases: files
</visibility>
<command><![CDATA[a2dismod php5]]></command>
</commands>
<commands index="5">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
</commands>
<!-- instead of just restarting apache, we let the cronjob do all the
dirty work -->
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>

View File

@ -48,6 +48,11 @@
<include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command>
<command><![CDATA[a2enmod headers]]></command>
<command>
<visibility mode="true">{{settings.system.use_ssl}}
</visibility>
<content><![CDATA[a2enmod ssl]]></content>
</command>
<command>
<visibility mode="true">{{settings.phpfpm.enabled}}
</visibility>
@ -4647,6 +4652,11 @@ aliases: files
</visibility>
<command><![CDATA[a2dismod php7.0]]></command>
</commands>
<commands index="5">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
</commands>
<!-- instead of just restarting apache, we let the cronjob do all the
dirty work -->
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>

View File

@ -49,6 +49,11 @@
<include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command>
<command><![CDATA[a2enmod headers]]></command>
<command>
<visibility mode="true">{{settings.system.use_ssl}}
</visibility>
<content><![CDATA[a2enmod ssl]]></content>
</command>
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
<visibility mode="true">{{settings.phpfpm.enabled}}
</visibility>
@ -85,6 +90,11 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
<include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command>
<command><![CDATA[a2enmod headers]]></command>
<command>
<visibility mode="true">{{settings.system.use_ssl}}
</visibility>
<content><![CDATA[a2enmod ssl]]></content>
</command>
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
<visibility mode="true">{{settings.phpfpm.enabled}}
</visibility>
@ -1761,6 +1771,11 @@ aliases: files
</visibility>
<command><![CDATA[a2dismod php5]]></command>
</commands>
<commands index="5">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
</commands>
<!-- instead of just restarting apache, we let the cronjob do all the
dirty work -->
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>

View File

@ -49,6 +49,11 @@
<include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command>
<command><![CDATA[a2enmod headers]]></command>
<command>
<visibility mode="true">{{settings.system.use_ssl}}
</visibility>
<content><![CDATA[a2enmod ssl]]></content>
</command>
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
<visibility mode="true">{{settings.phpfpm.enabled}}
</visibility>
@ -85,6 +90,11 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
<include>//service[@type='http']/general/commands</include>
<command><![CDATA[a2dismod userdir]]></command>
<command><![CDATA[a2enmod headers]]></command>
<command>
<visibility mode="true">{{settings.system.use_ssl}}
</visibility>
<content><![CDATA[a2enmod ssl]]></content>
</command>
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
<visibility mode="true">{{settings.phpfpm.enabled}}
</visibility>
@ -5561,6 +5571,11 @@ aliases: files
</visibility>
<command><![CDATA[a2dismod php5]]></command>
</commands>
<commands index="5">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
</commands>
<!-- instead of just restarting apache, we let the cronjob do all the
dirty work -->
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>