Commit c6611ee0 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'master' into 'master'

use mktemp in update scripts to avoid race conditions



See merge request !254
parents ea30e1c0 2c7813be
......@@ -29,7 +29,7 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@author Florian Schaal, info@schaal-24.de
@copyrighth Florian Schaal, info@schaal-24.de
@copyright Florian Schaal, info@schaal-24.de
*/
......
......@@ -28,7 +28,7 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@author Florian Schaal, info@schaal-24.de
@copyrighth Florian Schaal, info@schaal-24.de
@copyright Florian Schaal, info@schaal-24.de
*/
class validate_openvz {
......
......@@ -29,7 +29,7 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@author Florian Schaal, info@schaal-24.de
@copyrighth Florian Schaal, info@schaal-24.de
@copyright Florian Schaal, info@schaal-24.de
*/
......
#!/bin/bash
cd /tmp
rm -f ispconfig3-dev.tar.gz
{
umask 0077 \
&& tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
&& test -d "${tmpdir}" \
&& cd "${tmpdir}"
} || {
echo 'mktemp failed'
exit 1
}
wget -O ispconfig3-dev.tar.gz "http://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=master"
rm -rf ispconfig3-master*
tar xzf ispconfig3-dev.tar.gz
echo -n "Latest git version: "
ls -1d ispconfig3-master*
cd ispconfig3-master*/install
php -q \
-d disable_classes= \
-d disable_functions= \
-d open_basedir= \
update.php
cd /tmp
rm -rf /tmp/ispconfig3-master* /tmp/ispconfig3-dev.tar.gz
rm -rf "${tmpdir}"
exit 0
#!/bin/bash
cd /tmp
if [ -f ISPConfig-3-stable.tar.gz ]
then
rm -f ISPConfig-3-stable.tar.gz
fi
{
umask 0077 \
&& tmpdir=`mktemp -dt "$(basename $0).XXXXXXXXXX"` \
&& test -d "${tmpdir}" \
&& cd "${tmpdir}"
} || {
echo 'mktemp failed'
exit 1
}
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
if [ -f ISPConfig-3-stable.tar.gz ]
......@@ -13,14 +16,15 @@ then
tar xvfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/
php -q \
-d disable_classes= \
-d disable_functions= \
-d open_basedir= \
update.php
rm -rf /tmp/ispconfig3_install/install
rm -f ISPConfig-3-stable.tar.gz
-d disable_classes= \
-d disable_functions= \
-d open_basedir= \
update.php
cd /tmp
rm -rf "${tmpdir}"
else
echo "Unable to download the update."
exit 1
fi
exit 0
\ No newline at end of file
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment