Update basic_search_replace.yml
Installs and works. TODO: Have to figure out the correct condition for the Test mode/ dry run option Make the cli output as the Success messagemain
parent
1a2fc4db62
commit
e008b72dc9
|
@ -20,6 +20,13 @@ settings:
|
||||||
name: termReplace
|
name: termReplace
|
||||||
default: Terms to replace with
|
default: Terms to replace with
|
||||||
tooltip: Enter the terms to replace with
|
tooltip: Enter the terms to replace with
|
||||||
|
- type: checkbox
|
||||||
|
caption: Dry Run
|
||||||
|
name: testMode
|
||||||
|
value: false
|
||||||
|
hideLabel: false
|
||||||
|
hidden: false
|
||||||
|
tooltip: If check Search & Replace will run in test mode
|
||||||
|
|
||||||
onInstall:
|
onInstall:
|
||||||
- remoteOperations:
|
- remoteOperations:
|
||||||
|
@ -33,6 +40,7 @@ onInstall:
|
||||||
wget --directory-prefix=/var/www/webroot/mightybox-search-replace-db https://deploy-proxy.mightybox.io/kits/search_and_replace_add-on/raw/branch/main/basic_search_replace.sh
|
wget --directory-prefix=/var/www/webroot/mightybox-search-replace-db https://deploy-proxy.mightybox.io/kits/search_and_replace_add-on/raw/branch/main/basic_search_replace.sh
|
||||||
cd /var/www/webroot//mightybox-search-replace-db
|
cd /var/www/webroot//mightybox-search-replace-db
|
||||||
chmod +x basic_search_replace.sh
|
chmod +x basic_search_replace.sh
|
||||||
|
touch searchreplace.log
|
||||||
|
|
||||||
#user: root
|
#user: root
|
||||||
#sayYes: true
|
#sayYes: true
|
||||||
|
@ -48,7 +56,12 @@ actions:
|
||||||
searchReplace:
|
searchReplace:
|
||||||
- nodeGroup: cp
|
- nodeGroup: cp
|
||||||
cmd: |-
|
cmd: |-
|
||||||
./var/www/webroot/mightybox-search-replace-db/basic_search_replace.sh ${settings.termSearch} ${settings.termReplace}
|
cd /var/www/webroot/mightybox-search-replace-db/
|
||||||
|
./basic_search_replace.sh ${settings.termSearch} ${settings.termReplace}
|
||||||
|
if ( ${settings.testMode} == true ):
|
||||||
|
cmd: |-
|
||||||
|
cd /var/www/webroot/mightybox-search-replace-db/
|
||||||
|
./basic_search_replace.sh ${settings.termSearch} ${settings.termReplace} --dry-run
|
||||||
|
|
||||||
|
|
||||||
buttons:
|
buttons:
|
||||||
|
@ -58,4 +71,4 @@ buttons:
|
||||||
submitButtonText: Search & Replace
|
submitButtonText: Search & Replace
|
||||||
loadingText:
|
loadingText:
|
||||||
confirmText:
|
confirmText:
|
||||||
successText:
|
successText: /var/www/webroot/mightybox-search-replace-db/searchreplace.log
|
Loading…
Reference in New Issue