Only download ghost if needed

This commit is contained in:
Bob Mottram 2017-06-21 21:26:47 +01:00
parent 288e1d00f2
commit bf025a037b
1 changed files with 3 additions and 1 deletions

View File

@ -396,7 +396,9 @@ function install_ghost {
mkdir -p /var/www/$GHOST_DOMAIN_NAME/htdocs mkdir -p /var/www/$GHOST_DOMAIN_NAME/htdocs
fi fi
cd /var/www/$GHOST_DOMAIN_NAME/htdocs cd /var/www/$GHOST_DOMAIN_NAME/htdocs
wget ${GHOST_DOWNLOAD_URL} if [ ! -f Ghost-${GHOST_VERSION}.zip ]; then
wget ${GHOST_DOWNLOAD_URL}
fi
if [ ! -f Ghost-${GHOST_VERSION}.zip ]; then if [ ! -f Ghost-${GHOST_VERSION}.zip ]; then
echo $'Unable to download ghost' echo $'Unable to download ghost'
rm -rf /var/www/$GHOST_DOMAIN_NAME rm -rf /var/www/$GHOST_DOMAIN_NAME