replace config-template-variables also in commands to be executed, e.g. used in proftpd ssl-cert generation command

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-05-29 09:41:38 +02:00
parent 08563e9298
commit e5c16439e1

View File

@@ -74,7 +74,7 @@ if ($userinfo['change_serversettings'] == '1') {
foreach ($daemons as $di => $dd) { foreach ($daemons as $di => $dd) {
$title = $dd->title; $title = $dd->title;
if ($dd->default) { if ($dd->default) {
$title = $title." (".strtolower($lng['panel']['default']).")"; $title = $title . " (" . strtolower($lng['panel']['default']) . ")";
} }
$daemons_select .= makeoption($title, $di); $daemons_select .= makeoption($title, $di);
} }
@@ -133,11 +133,11 @@ if ($userinfo['change_serversettings'] == '1') {
} }
switch ($action['type']) { switch ($action['type']) {
case "install": case "install":
$commands .= $action['content'] . "\n"; $commands .= strtr($action['content'], $replace_arr) . "\n";
$lasttype = "install"; $lasttype = "install";
break; break;
case "command": case "command":
$commands .= $action['content'] . "\n"; $commands .= strtr($action['content'], $replace_arr) . "\n";
$lasttype = "command"; $lasttype = "command";
break; break;
case "file": case "file":
@@ -205,7 +205,7 @@ function getCompleteDistroName($cparser)
// get distro-info // get distro-info
$dist_display = $cparser->distributionName; $dist_display = $cparser->distributionName;
if ($cparser->distributionCodename != '') { if ($cparser->distributionCodename != '') {
$dist_display .= " ".$cparser->distributionCodename; $dist_display .= " " . $cparser->distributionCodename;
} }
if ($cparser->distributionVersion != '') { if ($cparser->distributionVersion != '') {
$dist_display .= " (" . $cparser->distributionVersion . ")"; $dist_display .= " (" . $cparser->distributionVersion . ")";