Przeglądaj źródła

adds an option to prevent running wp-cli when remote is running in a container

test
Jean-Christophe Vanhalle 2 lat temu
rodzic
commit
bc14e41615
2 zmienionych plików z 15 dodań i 10 usunięć
  1. 14
    10
      deploy-directory-to-remote.sh
  2. 1
    0
      deployment/deployment-example.env

+ 14
- 10
deploy-directory-to-remote.sh Wyświetl plik

exit 1 exit 1
fi fi


if ssh ${remote_ssh_string} "wp option patch update wpmm_settings general status 1 --path=${remote_wp_path}"; then
echo maintenance mode activated
else
echo something went horribly wrong
exit 1
if [ "${remote_is_docker}" != "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
echo something went horribly wrong
exit 1
fi
fi fi


if rsync --archive --compress --delete --delete-excluded --exclude-from="${deployment_exclude_file}" --human-readable --progress "${local_directory_path}/" "${remote_ssh_string}":"${remote_directory_path}"; then if rsync --archive --compress --delete --delete-excluded --exclude-from="${deployment_exclude_file}" --human-readable --progress "${local_directory_path}/" "${remote_ssh_string}":"${remote_directory_path}"; then
exit 1 exit 1
fi fi


if ssh ${remote_ssh_string} "wp option patch update wpmm_settings general status 0 --path=${remote_wp_path}"; then
echo maintenance mode deactivated
else
echo something went horribly wrong
exit 1
if [ "${remote_is_docker}" != "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
echo something went horribly wrong
exit 1
fi
fi fi

+ 1
- 0
deployment/deployment-example.env Wyświetl plik

remote_directory_path= remote_directory_path=
remote_ssh_string= remote_ssh_string=
remote_wp_path= remote_wp_path=
remote_is_docker=

Ładowanie…
Anuluj
Zapisz