From afee192d2a77afa1c11d25156d0a44df94e19aed Mon Sep 17 00:00:00 2001 From: A. Täffner <darkalex@firesplash.de> Date: Sat, 23 Jan 2016 07:30:37 -0500 Subject: [PATCH] fixed the cronjob and noticed a bug in ISPC but not able to report as FlySpray is offline --- server/scripts/update_from_tgz.sh | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/server/scripts/update_from_tgz.sh b/server/scripts/update_from_tgz.sh index d957979..9dcf52d 100644 --- a/server/scripts/update_from_tgz.sh +++ b/server/scripts/update_from_tgz.sh @@ -1,7 +1,30 @@ #!/bin/bash -cd /tmp +{ + 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 -cd ispconfig3_install/install/ -php -q update.php -rm -rf /tmp/ispconfig3_install/install \ No newline at end of file +if [ -f ISPConfig-3-stable.tar.gz ] +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 + cd /tmp + rm -rf "${tmpdir}" +else + echo "Unable to download the update." + exit 1 +fi + +exit 0 -- Gitblit v1.9.1