mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
update vesta templates
This commit is contained in:
parent
780641b9ce
commit
349308ef1c
2 changed files with 105 additions and 0 deletions
47
bin/v-update-dns-templates
Executable file
47
bin/v-update-dns-templates
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
# info: update dns templates
|
||||
# options: [RESTART]
|
||||
#
|
||||
# The function for obtaining updated pack of dns templates.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
restart=$1
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Get new archive
|
||||
tmpdir=$(mktemp -d --dry-run)
|
||||
mkdir $tmpdir
|
||||
cd $tmpdir
|
||||
wget http://c.vestacp.com/0.9.8/rhel/templates.tar.gz -q
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error: can't download template.tar.gz"
|
||||
log_event "$E_CONNECT" "$EVENT"
|
||||
rm -rf $tmpdir
|
||||
exit $E_CONNECT
|
||||
fi
|
||||
|
||||
# Update templates
|
||||
tar -xzpf templates.tar.gz -C $VESTA/data/ templates/dns
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Clean tmpdir
|
||||
rm -rf $tmpdir
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue