cleans up wording and adds another ssh string variable to use sudo
This commit is contained in:
@@ -29,7 +29,7 @@ if [ "${do_backup}" = "yes" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${remote_is_docker}" != "yes" ]; then
|
||||
if [ "${use_maintenance_mode}" = "yes" ]; then
|
||||
if ssh ${remote_ssh_string} "wp option patch update wpmm_settings general status 1 --path=${remote_wp_path}"; then
|
||||
echo maintenance mode activated
|
||||
else
|
||||
@@ -47,7 +47,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${remote_is_docker}" != "yes" ]; then
|
||||
if [ "${use_maintenance_mode}" = "yes" ]; then
|
||||
if ssh ${remote_ssh_string} "wp option patch update wpmm_settings general status 0 --path=${remote_wp_path}"; then
|
||||
echo maintenance mode deactivated
|
||||
else
|
||||
@@ -56,18 +56,8 @@ if [ "${remote_is_docker}" != "yes" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${remote_ssh_string}" = "staging" ]; then
|
||||
if [ "${restart_remote_varnish}" = "yes" ]; then
|
||||
set -x
|
||||
ssh federal sudo service varnish restart
|
||||
set +x
|
||||
fi
|
||||
if [ "${remote_ssh_string}" = "prod" ]; then
|
||||
set -x
|
||||
ssh federal sudo service varnish restart
|
||||
set +x
|
||||
fi
|
||||
if [ "${remote_ssh_string}" = "network" ]; then
|
||||
set -x
|
||||
ssh network sudo service varnish restart
|
||||
ssh "${sudo_remote_ssh_string}" sudo service varnish restart
|
||||
set +x
|
||||
fi
|
||||
|
||||
@@ -6,4 +6,7 @@ remote_directory_path=
|
||||
remote_ssh_string=
|
||||
remote_wp_path=
|
||||
remote_is_docker=
|
||||
restart_remote_varnish=no
|
||||
sudo_remote_ssh_string=
|
||||
use_maintenance_mode=no
|
||||
do_backup=yes
|
||||
|
||||
Reference in New Issue
Block a user