We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
vesta commands not working with phpseclib\net
vesta commands not working with phpseclib\net
First i tried with:
Output:
Then i tried with:
Output:
The $VESTA path not defined, when i connect with ssh2:
Other example: http://phpseclib.sourceforge.net/ssh/2.0/examples.html
Code: Select all
v-add-domain admin domain.com
Code: Select all
bash: v-add-domain: command not found
Code: Select all
/usr/bin/sudo /usr/local/vesta/bin/v-add-domain admin domain.com
Code: Select all
/usr/local/vesta/bin/v-add-domain: line 19: /func/main.sh: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 20: /func/ip.sh: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 21: /conf/vesta.conf: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 27: check_args: command not found
/usr/local/vesta/bin/v-add-domain: line 28: is_format_valid: command not found
/usr/local/vesta/bin/v-add-domain: line 32: is_object_valid: command not found
/usr/local/vesta/bin/v-add-domain: line 33: is_object_unsuspended: command not found
/usr/local/vesta/bin/v-add-domain: line 42: get_user_ip: command not found
/usr/local/vesta/bin/v-add-domain: line 44: check_result: command not found
/usr/local/vesta/bin/v-add-domain: line 67: /v-restart-web: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 68: check_result: command not found
/usr/local/vesta/bin/v-add-domain: line 70: /v-restart-proxy: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 71: check_result: command not found
/usr/local/vesta/bin/v-add-domain: line 73: /v-restart-dns: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 74: check_result: command not found
Code: Select all
$ssh = new SSH2($host);
$ssh->login($username, $password);
$ssh->exec("/usr/bin/sudo /usr/local/vesta/bin/v-add-domain admin domain.com");
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: vesta commands not working with phpseclib\net
Just add a $VESTA path:
Code: Select all
$ssh = new SSH2($host);
$ssh->login($username, $password);
$ssh->exec("export VESTA=/usr/local/vesta/");
$ssh->exec("/usr/bin/sudo /usr/local/vesta/bin/v-add-domain admin domain.com");
Re: vesta commands not working with phpseclib\net
grayfolk wrote: ↑Tue Nov 13, 2018 9:29 pmJust add a $VESTA path:
Code: Select all
$ssh = new SSH2($host); $ssh->login($username, $password); $ssh->exec("export VESTA=/usr/local/vesta/"); $ssh->exec("/usr/bin/sudo /usr/local/vesta/bin/v-add-domain admin domain.com");
Thanks this worked
Code: Select all
$ssh->exec("export VESTA=/usr/local/vesta/; /usr/bin/sudo /usr/local/vesta/bin/v-add-domain admin domain.com");
Re: vesta commands not working with phpseclib\net
Just out of curiosity, how come you're not using the VestaCP API?