use better test for creating ready page

This commit is contained in:
Ron Rennick 2020-09-10 13:23:18 -03:00
parent 88139f9603
commit bff1e799f4
1 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,6 @@ if $(wp core is-installed);
then
echo "Wordpress is already installed..."
else
WORDPRESS_INSTALLING=1
declare -p WORDPRESS_TITLE >/dev/null
declare -p WORDPRESS_LOGIN >/dev/null
declare -p WORDPRESS_PASSWORD >/dev/null
@ -62,8 +61,10 @@ if ! [[ ${CURRENT_DOMAIN} == ${URL} ]]; then
wp search-replace ${CURRENT_DOMAIN} ${URL}
fi
if [[ $WORDPRESS_INSTALLING ]];
if $(wp post list --post_type=page --name=ready);
then
echo "Ready page already exists..."
else
wp post create \
--post_type=page \
--post_status=publish \