Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

vesta commands not working with phpseclib\net

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
ihsudg
Posts: 2
Joined: Tue Nov 13, 2018 8:31 pm

Os: Debian 8x
Web: nginx + php-fpm
vesta commands not working with phpseclib\net
  • Quote

Post by ihsudg » Tue Nov 13, 2018 8:42 pm

First i tried with:

Code: Select all

v-add-domain admin domain.com
Output:

Code: Select all

bash: v-add-domain: command not found
Then i tried with:

Code: Select all

/usr/bin/sudo /usr/local/vesta/bin/v-add-domain admin domain.com
Output:

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
The $VESTA path not defined, when i connect with ssh2:

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");
Other example: http://phpseclib.sourceforge.net/ssh/2.0/examples.html
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: vesta commands not working with phpseclib\net
  • Quote

Post by grayfolk » Tue Nov 13, 2018 9:29 pm

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");
Top

ihsudg
Posts: 2
Joined: Tue Nov 13, 2018 8:31 pm

Os: Debian 8x
Web: nginx + php-fpm
Re: vesta commands not working with phpseclib\net
  • Quote

Post by ihsudg » Wed Nov 14, 2018 9:02 pm

grayfolk wrote: ↑
Tue Nov 13, 2018 9:29 pm
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");

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");
Top

ivanh
Posts: 41
Joined: Sun Mar 23, 2014 6:40 am

Re: vesta commands not working with phpseclib\net
  • Quote

Post by ivanh » Wed Nov 28, 2018 7:17 am

Just out of curiosity, how come you're not using the VestaCP API?
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password