(Solved) bash script to create Web/Ftp/DB
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
(Solved) bash script to create Web/Ftp/DB
Hi all,
@imperio @skurudo & other members... can you please help.
I'm writing a small script using VESTACP CLI but facing a bit of a problem. Here is the script
when I run the script it throws the following errors and DOESN'T CREATE any Web-domain
Using the VestaCP CLI directly does work, however I do get a warning message:
[/i][/b]
Any pointers how to fix this ?
@imperio @skurudo & other members... can you please help.
I'm writing a small script using VESTACP CLI but facing a bit of a problem. Here is the script
Code: Select all
#!/bin/bash
$domn='abc.com'
VESTA='/usr/local/vesta/bin'
# Adding default domain
$VESTA/v-add-domain $domn
Code: Select all
/usr/local/vesta/bin/v-add-domain: line 19: /usr/local/vesta/bin/func/main.sh: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 20: /usr/local/vesta/bin/func/ip.sh: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 21: /usr/local/vesta/bin/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 68: /v-restart-web: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 69: check_result: command not found
/usr/local/vesta/bin/v-add-domain: line 74: /v-restart-dns: No such file or directory
/usr/local/vesta/bin/v-add-domain: line 75: check_result: command not found
Code: Select all
v-add-domain admin abc.com
chown: invalid user: 'dovecot:mail'
Any pointers how to fix this ?
Last edited by mehargags on Mon Jul 11, 2016 6:43 am, edited 2 times in total.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: bash script to create Web/Ftp/DB
Resolved...
I was reusing the Environment variable $VESTA and declaring it again. Removed that line and it works now
Now the only problem now remains is when I create domain, it throws
I was reusing the Environment variable $VESTA and declaring it again. Removed that line and it works now
Now the only problem now remains is when I create domain, it throws
Code: Select all
chown: invalid user: 'dovecot:mail'