Added WP-CLI commands

main
Anthony 2024-09-13 23:20:29 +08:00
parent 3c70bfc4a3
commit 6a3c181656
1 changed files with 21 additions and 0 deletions

View File

@ -8,6 +8,12 @@ targetNodes:
nodeGroup: cp
menu:
- confirmText: Are you sure you want to execute this WP-CLI command?
loadingText: Executing WP-CLI command...
caption: Execute WP-CLI Command
action: dynamic_wp_cli
settings: wpCliConfig
successText: "${response.out}"
- confirmText: Are you sure you want to sync directories using rsync?
loadingText: Syncing directories...
caption: Sync Directories
@ -89,6 +95,13 @@ menu:
successText: "${response.out}"
settings:
wpCliConfig:
submitUnchanged: true
fields:
- name: wp_cli_command
type: text
caption: WP-CLI Command (without 'wp' prefix)
default: "help"
rsyncConfig:
submitUnchanged: true
fields:
@ -175,6 +188,14 @@ settings:
default: "7200"
actions:
dynamic_wp_cli:
- cmd[cp]:
commands:
- cd /var/www/webroot/ROOT/
- wp ${settings.wp_cli_command}
- return:
type: info
message: "${response.out}"
rsync_directories:
- cmd[cp]:
commands: