Update basic_search_replace.yml

Fixed  dry run condition
main
jay 2023-10-26 18:49:21 +00:00
parent 2c4f64176d
commit e5214eb762
1 changed files with 21 additions and 8 deletions

View File

@ -46,6 +46,9 @@ onInstall:
#user: root #user: root
#sayYes: true #sayYes: true
onUninstall:
- cmd [cp]: |-
rm -r /var/www/webroot/mightybox-search-replace-db
actions: actions:
@ -56,14 +59,24 @@ actions:
- command: ${this.cmd} - command: ${this.cmd}
searchReplace: searchReplace:
- nodeGroup: cp
cmd: |- - if ( ${settings.testMode} == false ):
cd /var/www/webroot/mightybox-search-replace-db/ - cmd [cp]: |-
./basic_search_replace.sh ${settings.termSearch} ${settings.termReplace} cd /var/www/webroot/mightybox-search-replace-db/
if ( ${settings.testMode} == true ): ./basic_search_replace.sh ${settings.termSearch} ${settings.termReplace} >> /var/www/webroot/mightybox-search-replace-db/searchreplace.log
cmd: |- wp cache flush --quiet --path=/var/www/webroot/ROOT/
cd /var/www/webroot/mightybox-search-replace-db/ rm -rf /var/www/webroot/.cache/vhosts/Jelastic/*
./basic_search_replace-dry-run.sh ${settings.termSearch} ${settings.termReplace} tail -8 /var/www/webroot/mightybox-search-replace-db/searchreplace.log | head -7
- if ( ${settings.testMode} == true ):
- cmd [cp]: |-
cd /var/www/webroot/mightybox-search-replace-db/
./basic_search_replace-dry-run.sh ${settings.termSearch} ${settings.termReplace} >> /var/www/webroot/mightybox-search-replace-db/searchreplace.log
wp cache flush --quiet --path=/var/www/webroot/ROOT/
rm -rf /var/www/webroot/.cache/vhosts/Jelastic/*
tail -8 /var/www/webroot/mightybox-search-replace-db/searchreplace.log | head -7
- return:
type: success
message: ${response.out}
buttons: buttons: