exp:exphostrun
Run a console command (or, with --shell, a command line) in this installation on one host of settings/cluster.ini, over ssh.
Script bin/php/exphostrun.php, code in kernel/private/classes/commands/exphostrun.php. Run it from the installation root, as the user the web server runs as:
./console exp:exphostrun --help
./console exp:host:run --help
php bin/php/exphostrun.php --helpHelp text
Run a command in this installation on one host, over ssh
The host is one of settings/cluster.ini [ClusterSettings] HostList[]. The words after --
are a console command run there as bin/php/console <words>, in the installation's root
on that host, with its PHP binary, as its User= (sudo -n), else as the ssh login.
--shell runs the words as a command line for sh instead. ssh runs with BatchMode=yes:
a host that would ask for a password fails. Nothing is interactive.
./console exp:host:run web -- exp:cache status
./console exp:host:run web -- exp:ezcache --clear-tag=template
./console exp:host:run web --shell -- git log -1 --oneline
./console exp:host:run web --dry-run -- exp:velocity deploy
Exit code: 0 PASS; 1 the command failed on the host (or ssh did); 2 wrong options or settings.Related
Generated by ./console exp:help:examples from bin/php/exphostrun.php, kernel/private/classes/commands/exphostrun.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.