Skip to content

Commit 02c5c17

Browse files
committed
1 parent 66768ac commit 02c5c17

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

server/scripts/ispconfig_update.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@
2828
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31+
function sread() {
32+
$input = fgets(STDIN);
33+
return rtrim($input);
34+
}
35+
36+
function swrite($text = '') {
37+
echo $text;
38+
}
39+
40+
function swriteln($text = '') {
41+
echo $text."\n";
42+
}
43+
3144
function simple_query($query, $answers, $default)
3245
{
3346
$finished = false;
@@ -75,13 +88,13 @@ function simple_query($query, $answers, $default)
7588
echo "\n\n>> Update \n\n";
7689
echo "Please choose the update method. For production systems select 'stable'. \nThe update from svn is only for development systems and may break your current setup.\n\n";
7790

78-
$method = $inst->simple_query('Select update method', array('stable','svn'), 'stable');
91+
$method = simple_query('Select update method', array('stable','svn'), 'stable');
7992

8093
if($method == 'stable') {
8194
$new_version = file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt') or die('Unable to retrieve version file.');
8295
$new_version = trim($new_version);
8396
if($new_version != ISPC_APP_VERSION) {
84-
exec('/usr/local/ispconfig/server/scripts/update_from_tgz.sh')
97+
exec('/usr/local/ispconfig/server/scripts/update_from_tgz.sh');
8598
} else {
8699
echo "There are no updates available.\n";
87100
}

server/scripts/update_from_tgz.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
cd /tmp
44
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
5+
tar xvfz ISPConfig-3-stable.tar.gz
56
cd ispconfig3_install/install/
67
php -q update.php
78
rm -rf /tmp/ispconfig3_install/install

0 commit comments

Comments
 (0)