Skip to content

Commit c11c4f7

Browse files
author
vogelor
committed
some improvements of the remote action "update ISPConfig"
1 parent 8143c39 commit c11c4f7

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

interface/web/admin/lib/lang/de.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ $wb['Merge'] = 'Merge';
3939
$wb['Remote Users'] = 'Remote Benutzer';
4040
$wb['Remote Actions'] = 'Remote Aktionen';
4141
$wb['Do OS-Update'] = 'Betriebssystem Update ausführen';
42+
$wb['Do ISPConfig-Update'] = 'ISPConfig auf den neuesten Stand bringen';
4243
?>

interface/web/admin/lib/lang/en.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ $wb['Merge'] = 'Merge';
4141
$wb['Remote Users'] = 'Remote Users';
4242
$wb['Remote Actions'] = 'Remote Actions';
4343
$wb['Do OS-Update'] = 'Do OS-Update';
44+
$wb['Do ISPConfig-Update'] = 'Do ISPConfig-Update';
4445
?>

interface/web/admin/lib/module.conf.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@
159159
'target' => 'content',
160160
'link' => 'admin/remote_action_osupdate.php');
161161

162+
$items[] = array( 'title' => 'Do ISPConfig-Update',
163+
'target' => 'content',
164+
'link' => 'admin/remote_action_ispcupdate.php');
165+
162166
$module['nav'][] = array( 'title' => 'Remote Actions',
163167
'open' => 1,
164168
'items' => $items);

interface/web/admin/templates/remote_action_ispcupdate.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h2><tmpl_var name="do_ispcupdate_caption"></h2>
44
<div class="panel panel_language_add">
55

66
<div class="pnl_formsarea">
7-
<fieldset class="inlineLabels"><legend>{tmpl_var name='do_osupdate_caption'}</legend>
7+
<fieldset class="inlineLabels"><legend>{tmpl_var name='do_ispcupdate_caption'}</legend>
88
<div class="ctrlHolder">
99
<label for="server_select">{tmpl_var name='select_server_txt'}</label>
1010
<select name="server_select" id="server" class="selectInput" onchange="document.getElementById('OKMsg').style.visibility = 'hidden'; ">
@@ -18,7 +18,7 @@ <h2><tmpl_var name="do_ispcupdate_caption"></h2>
1818
</tmpl_if>
1919

2020
<div class="buttonHolder buttons">
21-
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_do_txt'}" onClick="submitForm('pageForm','admin/remote_action_osupdate.php');"><span>{tmpl_var name='btn_do_txt'}</span></button>
21+
<button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_do_txt'}" onClick="submitForm('pageForm','admin/remote_action_ispcupdate.php');"><span>{tmpl_var name='btn_do_txt'}</span></button>
2222
</div>
2323
</div>
2424

server/mods-available/remoteaction_core_module.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,15 @@ private function _doIspCUpdate($action) {
147147
/*
148148
* Do the update
149149
*/
150-
exec("cd /tmp");
150+
$oldDir = getcwd();
151+
chdir("/tmp");
152+
153+
exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz");
154+
exec("rm /tmp/ispconfig3_install -R");
151155
exec("wget http://www.ispconfig.org/downloads/ISPConfig-" . $new_version . ".tar.gz");
152156
exec("tar xvfz ISPConfig-" . $new_version . ".tar.gz");
153-
exec("cd ispconfig3_install/install");
154157

158+
chdir("/tmp/ispconfig3_install/install");
155159
exec("touch autoupdate");
156160
exec("php -q autoupdate.php");
157161

0 commit comments

Comments
 (0)