Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thelfensdrfer/yiisshconsole
SSH console commands for yii
https://github.com/thelfensdrfer/yiisshconsole
php ssh yii yii-console
Last synced: 3 months ago
JSON representation
SSH console commands for yii
- Host: GitHub
- URL: https://github.com/thelfensdrfer/yiisshconsole
- Owner: thelfensdrfer
- License: mit
- Created: 2014-05-12T10:37:05.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T15:19:15.000Z (almost 8 years ago)
- Last Synced: 2024-10-11T21:55:51.591Z (4 months ago)
- Topics: php, ssh, yii, yii-console
- Language: PHP
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Yii SSH Console
Controller with ssh commands for the yii console.
## Example
```php
auth('example.com', [
'username' => 'myusername',
'password' => 'mypassword', // optional
]);// Or via private key
/*
$this->auth('example.com', [
'username' => 'myusername',
'key' => '/path/to/private.key',
'password' => 'mykeypassword', // optional
]);
*/$output = $this->run('echo "test"');
echo 'Output: ' . $output; // Output: test$output = $this->run([
'cd /path/to/install',
'./put_offline.sh',
'git pull -f',
'composer install',
'./yii migrate --interactive=0',
'./build.sh',
'./yii cache/flush',
'./put_online.sh',
]);// Or via callback
$this->run([
'cd /path/to/install',
'./put_offline.sh',
'git pull -f',
'composer install',
'./yii migrate --interactive=0',
'./build.sh',
'./yii cache/flush',
'./put_online.sh',
], function($line) {
echo $line;
});
}
}
```And then in the local console:
```
./yiic deploy
```