Mage/Task/AbstractTask.php
/**
     * Runs a Shell Command on the Remote Host
     * @param string $command
     * @param string $output
     * @return boolean
     */
Runs a Shell Command on the Remote Host
@param string $command
@param string $output
@return boolean
Runs a Shell Command on the Remote Host @param string $command @param string $output @return boolean
protected final function runCommandRemote($command, &$output = null)
    {
        if ($this->getConfig()->release('enabled', false) == true) {
            if ($this instanceOf IsReleaseAware) {
                $releasesDirectory = '';
            } else {
                $releasesDirectory = '/'
                                   . $this->getConfig()->release('directory', 'releases')
                                   . '/'
                                   . $this->getConfig()->getReleaseId();
            }
        } else {
            $releasesDirectory = '';
        }
        $localCommand = 'ssh -p ' . $this->getConfig()->getHostPort() . ' '
                      . '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
                      . $this->getConfig()->deployment('user') . '@' . $this->getConfig()->getHostName() . ' '
                      . '"cd ' . rtrim($this->getConfig()->deployment('to'), '/') . $releasesDirectory . ' && '
                      . str_replace('"', '\"', $command) . '"';
        return $this->runCommandLocal($localCommand, $output);
    }
protected final function runCommandRemote ( $ command , & $ output = null ) { if ( $ this -> getConfig ( ) -> release ( 'enabled' , false ) == true ) { if ( $ this instanceOf IsReleaseAware ) { $ releasesDirectory = '' ; } else { $ releasesDirectory = '/' . $ this -> getConfig ( ) -> release ( 'directory' , 'releases' ) . '/' . $ this -> getConfig ( ) -> getReleaseId ( ) ; } } else { $ releasesDirectory = '' ; } $ localCommand = 'ssh -p ' . $ this -> getConfig ( ) -> getHostPort ( ) . ' ' . '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ' . $ this -> getConfig ( ) -> deployment ( 'user' ) . '@' . $ this -> getConfig ( ) -> getHostName ( ) . ' ' . '"cd ' . rtrim ( $ this -> getConfig ( ) -> deployment ( 'to' ) , '/' ) . $ releasesDirectory . ' && ' . str_replace ( '"' , '\"' , $ command ) . '"' ; return $ this -> runCommandLocal ( $ localCommand , $ output ) ; }
Runs a Shell Command on the Remote Host
 @param string $command
 @param string $output
 @return boolean
Runs a Shell Command on the Remote Host @param string $command @param string $output @return boolean