Commit 5a2fb766 authored by Marius Burkard's avatar Marius Burkard

Merge branch 'install-via-git' into 'master'

Install via git from current directory

See merge request !2
parents eab045a6 e092e141
Pipeline #7790 passed with stage
in 35 seconds
......@@ -10,6 +10,11 @@ WGET=$(which wget) ;
PHP=$(which php) ;
APT=$(which apt-get) ;
use_git=false;
if [ -d .git ]; then
use_git=true;
fi
if [ "$APT" = "" ] ; then
echo "It seems you are using a distribution that has no apt-get available. This is not supported.";
exit 1 ;
......@@ -37,29 +42,34 @@ if [ "$PHP" = "" ] ; then
exit 1;
fi
if [ "$CURL" != "" ] ; then
$CURL -s -o /tmp/ispconfig-ai.tar.gz "https://www.ispconfig.org/downloads/ispconfig-ai.tar.gz" >/dev/null 2>&1
else
$WGET -q -O /tmp/ispconfig-ai.tar.gz "https://www.ispconfig.org/downloads/ispconfig-ai.tar.gz" >/dev/null 2>&1
fi
INSTALL_DIR=".";
if [ "$use_git" = false ] ; then
if [ ! -f "/tmp/ispconfig-ai.tar.gz" ] ; then
echo "Failed downloading Autoinstaller" ;
exit 1;
fi
if [ "$CURL" != "" ] ; then
$CURL -s -o /tmp/ispconfig-ai.tar.gz "https://www.ispconfig.org/downloads/ispconfig-ai.tar.gz" >/dev/null 2>&1
else
$WGET -q -O /tmp/ispconfig-ai.tar.gz "https://www.ispconfig.org/downloads/ispconfig-ai.tar.gz" >/dev/null 2>&1
fi
if [ ! -f "/tmp/ispconfig-ai.tar.gz" ] ; then
echo "Failed downloading Autoinstaller" ;
exit 1;
fi
rm -rf /tmp/ispconfig-ai ;
mkdir /tmp/ispconfig-ai ;
tar -C /tmp/ispconfig-ai/ -xzf /tmp/ispconfig-ai.tar.gz || (echo "Failed extracting Autoinstaller" ; exit 1)
rm -f /tmp/ispconfig-ai.tar.gz ;
cd /tmp/ispconfig-ai ;
rm -rf /tmp/ispconfig-ai ;
mkdir /tmp/ispconfig-ai ;
tar -C /tmp/ispconfig-ai/ -xzf /tmp/ispconfig-ai.tar.gz || (echo "Failed extracting Autoinstaller" ; exit 1)
rm -f /tmp/ispconfig-ai.tar.gz ;
cd /tmp/ispconfig-ai ;
INSTALL_DIR="/tmp/ispconfig-ai";
fi
TTY=$(ps ax | grep "^[ ]*"$$ | head -n 1 | awk '{ print $2 }' 2>/dev/null);
if [ "$TTY" != "" ] ; then
${PHP} -q /tmp/ispconfig-ai/ispconfig.ai.php $@ < /dev/${TTY} ;
${PHP} -q "$INSTALL_DIR/ispconfig.ai.php" $@ < /dev/${TTY} ;
else
echo "It seems you are not using a TTY. Please add --i-know-what-i-am-doing to the arguments.";
${PHP} -q /tmp/ispconfig-ai/ispconfig.ai.php $@ ;
${PHP} -q "$INSTALL_DIR/ispconfig.ai.php" $@ ;
fi
cd ${CURDIR} ;
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