various fixes

This commit is contained in:
Ray Elliott 2020-09-04 14:23:11 +01:00
parent 8d9df59d11
commit 7c0481a960
1 changed files with 13 additions and 2 deletions

View File

@ -47,13 +47,17 @@ PHP
--admin_password="$wp_pass" \
--admin_email="$wp_email"
fi
EOSSH
if [ -n "$wp_themes" ] ; then
printf "\nInstalling themes ..."
option='--activate'
for theme in $wp_themes ; do
echo " installing $theme ..."
ssh -T $ssh << EOSSH
su "$user"
wp theme install $theme "$option" --path="$wp_path"
EOSSH
option=''
done
fi
@ -62,7 +66,10 @@ if [ -n "$wp_plugins" ] ; then
printf "\nInstalling plugins ..."
for plugin in $wp_plugins ; do
echo " installing $plugin ..."
ssh -T $ssh << EOSSH
su "$user"
wp plugin install $plugin --path="$wp_path"
EOSSH
done
fi
@ -70,7 +77,10 @@ if [ -n "$wp_plugins_active" ] ; then
printf "\nInstalling plugins to activate ..."
for plugin in $wp_plugins_active ; do
echo " installing $plugin ..."
ssh -T $ssh << EOSSH
su "$user"
wp plugin install $plugin --activate --path="$wp_path"
EOSSH
done
fi
@ -78,13 +88,14 @@ if [ -n "$wp_plugins_active" ] ; then
printf "\nUninstalling plugins ..."
for plugin in $wp_plugins_uninstall ; do
echo " installing $plugin ..."
ssh -T $ssh << EOSSH
su "$user"
wp plugin deactivate $plugin --path="$wp_path"
wp plugin uninstall $plugin --path="$wp_path"
EOSSH
done
fi
EOSSH
config_path='/etc/apache2/sites-available/wordpress.conf'
ssh -T $ssh << EOSSH
if [ -n "$apache2_version" ] ; then