mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
replaced underscore with dash in api syscalls
This commit is contained in:
parent
7ed705cee7
commit
b6b7eacadb
283 changed files with 438 additions and 412 deletions
47
bin/v-change-sys-ip-name
Executable file
47
bin/v-change-sys-ip-name
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
# info: change ip name
|
||||
# options: ip name
|
||||
#
|
||||
# The function for changing dns domain associated with ip.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
ip=$1
|
||||
ip_name=$2
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
source $VESTA/func/ip.sh
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '2' "$#" 'ip ip_name'
|
||||
validate_format 'ip' 'ip_name'
|
||||
is_ip_valid
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Changing ip name
|
||||
update_ip_value '$NAME' "$ip_name"
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Logging
|
||||
log_history "changed associated dns on $ip to $domain" '' 'admin'
|
||||
log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue