mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Update v-get-database-credentials-of-domain
This commit is contained in:
parent
4a12408981
commit
d3229d4fbd
1 changed files with 6 additions and 15 deletions
|
@ -1,28 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# info: get database credentials of domain and other basic data
|
||||
# info: get database credentials and other basic data of domain
|
||||
# options: DOMAIN [SUBFOLDER]
|
||||
#
|
||||
# The function get database credentials of domain and other basic data.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Check necessary parameters #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "USAGE: v-get-database-credentials-of-site DOMAIN [SUBFOLDER]"
|
||||
exit 1
|
||||
fi
|
||||
# The function get database credentials and other basic data of domain.
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
|
||||
# Argument definition
|
||||
DOMAIN=$1
|
||||
domain=$1
|
||||
SUBFOLDER=''
|
||||
if [ $# -gt 1 ]; then
|
||||
SUBFOLDER=$2
|
||||
|
@ -34,11 +22,14 @@ source /etc/profile
|
|||
# Includes
|
||||
source /usr/local/vesta/func/main.sh
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '1' "$#" 'DOMAIN [SUBFOLDER]'
|
||||
domain=$DOMAIN
|
||||
is_format_valid 'domain'
|
||||
|
||||
USER=$(/usr/local/vesta/bin/v-search-domain-owner "$DOMAIN")
|
||||
if [ -z "$USER" ]; then
|
||||
echo "Error: domain $DOMAIN does not exists"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue