Remove directory if it already exists
This commit is contained in:
parent
7f89e7d87a
commit
55446a0bf8
|
@ -217,10 +217,10 @@ function install_bludit {
|
||||||
apt-get -yq install php-gettext php-curl php-gd php-mysql git curl
|
apt-get -yq install php-gettext php-curl php-gd php-mysql git curl
|
||||||
apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl
|
apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl
|
||||||
|
|
||||||
if [ ! -d "/var/www/$BLUDIT_DOMAIN_NAME" ]; then
|
if [ -d "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" ]; then
|
||||||
mkdir "/var/www/$BLUDIT_DOMAIN_NAME"
|
rm -rf "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
|
||||||
fi
|
fi
|
||||||
if [ ! -d "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" ]; then
|
|
||||||
if [ -d /repos/bludit ]; then
|
if [ -d /repos/bludit ]; then
|
||||||
mkdir "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
|
mkdir "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
|
||||||
cp -r -p /repos/bludit/. "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
|
cp -r -p /repos/bludit/. "/var/www/$BLUDIT_DOMAIN_NAME/htdocs"
|
||||||
|
@ -234,7 +234,6 @@ function install_bludit {
|
||||||
echo $'Unable to clone bludit repo'
|
echo $'Unable to clone bludit repo'
|
||||||
exit 87525
|
exit 87525
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
cd "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" || exit 36587356
|
cd "/var/www/$BLUDIT_DOMAIN_NAME/htdocs" || exit 36587356
|
||||||
git checkout $BLUDIT_COMMIT -b $BLUDIT_COMMIT
|
git checkout $BLUDIT_COMMIT -b $BLUDIT_COMMIT
|
||||||
|
|
|
@ -593,10 +593,11 @@ if [[ "$app_php" == 'yes' ]]; then
|
||||||
echo ' apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl'
|
echo ' apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl'
|
||||||
echo ''
|
echo ''
|
||||||
fi
|
fi
|
||||||
echo " if [ ! -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME\" ]; then"
|
|
||||||
echo " mkdir \"/var/www/\$${app_name_upper}_DOMAIN_NAME\""
|
echo " if [ -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" ]; then"
|
||||||
|
echo " rm -rf \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
|
||||||
echo ' fi'
|
echo ' fi'
|
||||||
echo " if [ ! -d \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" ]; then"
|
|
||||||
echo " if [ -d /repos/${app_name} ]; then"
|
echo " if [ -d /repos/${app_name} ]; then"
|
||||||
echo " mkdir \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
|
echo " mkdir \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\""
|
||||||
if [ ! "$app_dir" ]; then
|
if [ ! "$app_dir" ]; then
|
||||||
|
@ -623,7 +624,6 @@ fi
|
||||||
echo " echo \$'Unable to clone ${app_name} repo'"
|
echo " echo \$'Unable to clone ${app_name} repo'"
|
||||||
echo ' exit 87525'
|
echo ' exit 87525'
|
||||||
echo ' fi'
|
echo ' fi'
|
||||||
echo ' fi'
|
|
||||||
echo ''
|
echo ''
|
||||||
if [ ! "$app_dir" ]; then
|
if [ ! "$app_dir" ]; then
|
||||||
echo " cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 36587356"
|
echo " cd \"/var/www/\$${app_name_upper}_DOMAIN_NAME/htdocs\" || exit 36587356"
|
||||||
|
|
Loading…
Reference in New Issue