Skip to content

Commit 299f8eb

Browse files
author
Till Brehm
committed
Added support for git-stable branch (currently stable-3.1 branch) in ISPConfig update script for easier development and testing.
1 parent 6368225 commit 299f8eb

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

server/scripts/ispconfig_update.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function simple_query($query, $answers, $default)
8888
echo "\n\n>> Update \n\n";
8989
echo "Please choose the update method. For production systems select 'stable'. \nWARNING: The update from GIT is only for development systems and may break your current setup. Do not use the GIT version on servers that host any live websites!\nNote: Update all slave server, before you update master server.\n\n";
9090

91-
$method = simple_query('Select update method', array('stable', 'git'), 'stable');
91+
$method = simple_query('Select update method', array('stable', 'git-stable', 'git-master'), 'stable');
9292

9393
if($method == 'stable') {
9494
$new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt') or die('Unable to retrieve version file.');
@@ -99,6 +99,9 @@ function simple_query($query, $answers, $default)
9999
} else {
100100
echo "There are no updates available for ISPConfig ".ISPC_APP_VERSION."\n";
101101
}
102+
} elseif ($method == 'git-stable') {
103+
passthru('/usr/local/ispconfig/server/scripts/update_from_dev_stable.sh');
104+
exit;
102105
} else {
103106
passthru('/usr/local/ispconfig/server/scripts/update_from_dev.sh');
104107
exit;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
{
4+
umask 0077 \
5+
&& tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
6+
&& test -d "${tmpdir}" \
7+
&& cd "${tmpdir}"
8+
} || {
9+
echo 'mktemp failed'
10+
exit 1
11+
}
12+
13+
wget -O ispconfig3-dev.tar.gz "http://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1"
14+
tar xzf ispconfig3-dev.tar.gz
15+
16+
echo -n "Latest git version: "
17+
ls -1d ispconfig3-master*
18+
cd ispconfig3-master*/install
19+
20+
php -q \
21+
-d disable_classes= \
22+
-d disable_functions= \
23+
-d open_basedir= \
24+
update.php
25+
26+
cd /tmp
27+
rm -rf "${tmpdir}"
28+
29+
exit 0

0 commit comments

Comments
 (0)