Compare commits

...

2 Commits

Author SHA1 Message Date
Ray Elliott 7c0481a960 various fixes 2020-09-04 14:23:11 +01:00
Ray Elliott 8d9df59d11 remove .com from wordpress url, reove allow-root optoins 2020-09-04 13:34:57 +01:00
1 changed files with 19 additions and 8 deletions

View File

@ -41,19 +41,23 @@ define( 'WP_DEBUG_LOG', true );
PHP PHP
wp core install \ wp core install \
--path="$wp_path" \ --path="$wp_path" \
--url="$domain".com \ --url="$domain" \
--title="$wp_title" \ --title="$wp_title" \
--admin_user="$wp_user" \ --admin_user="$wp_user" \
--admin_password="$wp_pass" \ --admin_password="$wp_pass" \
--admin_email="$wp_email" --admin_email="$wp_email"
fi fi
EOSSH
if [ -n "$wp_themes" ] ; then if [ -n "$wp_themes" ] ; then
printf "\nInstalling themes ..." printf "\nInstalling themes ..."
option='--activate' option='--activate'
for theme in $wp_themes ; do for theme in $wp_themes ; do
echo " installing $theme ..." echo " installing $theme ..."
wp theme install $theme "$option" --path="$wp_path" --allow-root ssh -T $ssh << EOSSH
su "$user"
wp theme install $theme "$option" --path="$wp_path"
EOSSH
option='' option=''
done done
fi fi
@ -62,7 +66,10 @@ if [ -n "$wp_plugins" ] ; then
printf "\nInstalling plugins ..." printf "\nInstalling plugins ..."
for plugin in $wp_plugins ; do for plugin in $wp_plugins ; do
echo " installing $plugin ..." echo " installing $plugin ..."
wp plugin install $plugin --path="$wp_path" --allow-root ssh -T $ssh << EOSSH
su "$user"
wp plugin install $plugin --path="$wp_path"
EOSSH
done done
fi fi
@ -70,7 +77,10 @@ if [ -n "$wp_plugins_active" ] ; then
printf "\nInstalling plugins to activate ..." printf "\nInstalling plugins to activate ..."
for plugin in $wp_plugins_active ; do for plugin in $wp_plugins_active ; do
echo " installing $plugin ..." echo " installing $plugin ..."
wp plugin install $plugin --activate --path="$wp_path" --allow-root ssh -T $ssh << EOSSH
su "$user"
wp plugin install $plugin --activate --path="$wp_path"
EOSSH
done done
fi fi
@ -78,13 +88,14 @@ if [ -n "$wp_plugins_active" ] ; then
printf "\nUninstalling plugins ..." printf "\nUninstalling plugins ..."
for plugin in $wp_plugins_uninstall ; do for plugin in $wp_plugins_uninstall ; do
echo " installing $plugin ..." echo " installing $plugin ..."
wp plugin deactivate $plugin --path="$wp_path" --allow-root ssh -T $ssh << EOSSH
wp plugin uninstall $plugin --path="$wp_path" --allow-root su "$user"
wp plugin deactivate $plugin --path="$wp_path"
wp plugin uninstall $plugin --path="$wp_path"
EOSSH
done done
fi fi
EOSSH
config_path='/etc/apache2/sites-available/wordpress.conf' config_path='/etc/apache2/sites-available/wordpress.conf'
ssh -T $ssh << EOSSH ssh -T $ssh << EOSSH
if [ -n "$apache2_version" ] ; then if [ -n "$apache2_version" ] ; then