remove plugin uninstall
This commit is contained in:
parent
bbc106c018
commit
8a3c354254
|
@ -4,7 +4,6 @@ echo "Installing WordPress .."
|
||||||
[ -z "$ssh_user" ] || [ -z "$ssh_root" ] && echo "Error: user and root ssh configuration must be specified" && exit 5
|
[ -z "$ssh_user" ] || [ -z "$ssh_root" ] && echo "Error: user and root ssh configuration must be specified" && exit 5
|
||||||
|
|
||||||
ssh -T $ssh_root << EOSSH
|
ssh -T $ssh_root << EOSSH
|
||||||
|
|
||||||
# install wp-cli first
|
# install wp-cli first
|
||||||
if [ ! -f /usr/local/bin/wp ] ; then
|
if [ ! -f /usr/local/bin/wp ] ; then
|
||||||
wget -nv -O /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
|
wget -nv -O /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
|
||||||
|
@ -16,6 +15,11 @@ ssh -T $ssh_user << EOSSH
|
||||||
if wp core is-installed --quiet --path="$wp_path" ; then
|
if wp core is-installed --quiet --path="$wp_path" ; then
|
||||||
echo "WordPress already installed"
|
echo "WordPress already installed"
|
||||||
else
|
else
|
||||||
|
echo "wp core download \
|
||||||
|
--version=$wp_version \
|
||||||
|
--path=$wp_path \
|
||||||
|
--skip-content \
|
||||||
|
--locale=$wp_locale"
|
||||||
wp core download \
|
wp core download \
|
||||||
--version="$wp_version" \
|
--version="$wp_version" \
|
||||||
--path="$wp_path" \
|
--path="$wp_path" \
|
||||||
|
@ -73,22 +77,11 @@ EOSSH
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$wp_plugins_active" ] ; then
|
if [ -n "$_apache2_version" ] ; then
|
||||||
printf "\nUninstalling plugins ..."
|
|
||||||
for plugin in $wp_plugins_uninstall ; do
|
|
||||||
echo " installing $plugin ..."
|
|
||||||
ssh -T $ssh_user << EOSSH
|
|
||||||
wp plugin deactivate $plugin --path="$wp_path"
|
|
||||||
wp plugin uninstall $plugin --path="$wp_path"
|
|
||||||
EOSSH
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
config_path='/etc/apache2/sites-available/wordpress.conf'
|
|
||||||
ssh -T $ssh_root << EOSSH
|
ssh -T $ssh_root << EOSSH
|
||||||
if [ -n "$apache2_version" ] ; then
|
if [ -n "$apache2_version" ] ; then
|
||||||
mkdir -p /var/log/wordpress/
|
mkdir -p /var/log/wordpress/
|
||||||
cat << EOF > $config_path
|
cat << EOF > /etc/apache2/sites-available/wordpress.conf
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName $domain
|
ServerName $domain
|
||||||
DocumentRoot $wp_path
|
DocumentRoot $wp_path
|
||||||
|
@ -110,5 +103,12 @@ EOF
|
||||||
a2ensite wordpress
|
a2ensite wordpress
|
||||||
a2dissite 000-default
|
a2dissite 000-default
|
||||||
systemctl reload apache2
|
systemctl reload apache2
|
||||||
|
elif [ -n "nginx_version" ] ; then
|
||||||
|
echo "TODO - nginx wordpress config"
|
||||||
|
elif [ -n "litespeed_version" ] ; then
|
||||||
|
echo "TODO - litespeed wordpress config"
|
||||||
|
else
|
||||||
|
echo "Warning: no webserver configuration found"
|
||||||
fi
|
fi
|
||||||
EOSSH
|
EOSSH
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue