From 7c0481a9601fb8c7f2892e8cadd89fba0e618c8b Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 4 Sep 2020 14:23:11 +0100 Subject: [PATCH] various fixes --- install/scripts/install-wordpress.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/install/scripts/install-wordpress.sh b/install/scripts/install-wordpress.sh index e3609f0..07fabd9 100755 --- a/install/scripts/install-wordpress.sh +++ b/install/scripts/install-wordpress.sh @@ -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