File tree Expand file tree Collapse file tree 1 file changed +9
-20
lines changed
Expand file tree Collapse file tree 1 file changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -21,42 +21,31 @@ source $HESTIA/conf/hestia.conf
2121# Action #
2222# ----------------------------------------------------------#
2323
24- # Defining config host
25- chost=' c.vestacp.com'
26-
2724# Detcing OS
2825case $( head -n1 /etc/issue | cut -f 1 -d ' ' ) in
2926 Debian) version=" debian" ;;
3027 Ubuntu) version=" ubuntu" ;;
31- * ) version=" rhel " ;;
28+ * ) version=" NotSupported " ;;
3229esac
3330
3431# Detecting release
35- if [ " $version " = ' rhel' ]; then
36- if [ -e ' /etc/redhat-release' ]; then
37- release=$( grep -o " [0-9]" /etc/redhat-release | head -n1)
38- else
39- release=6
40- fi
41- fi
4232if [ " $version " = ' ubuntu' ]; then
4333 release=$( lsb_release -r | awk ' {print $2}' )
4434fi
4535if [ " $version " = ' debian' ]; then
4636 release=$( cat /etc/issue| grep -o [0-9]| head -n1)
4737fi
38+ if [ " $version " = ' NotSupported' ]; then
39+ echo " No Supported OS Version found, abort."
40+ exit 1
41+ fi
4842
49- # Defining download url
50- vestacp=" http://$chost /$version /$release "
51-
52- # Downloading template archive
53- cd $( mktemp -d)
54- wget $vestacp /templates.tar.gz -q
55-
56- check_result $? " can't download template.tar.gz" $E_CONNECT
43+ # Defining template path
44+ hestiacp=" $HESTIA /install/$version /$release "
5745
5846# Updating templates
59- tar -xzpf templates.tar.gz -C $HESTIA /data/ templates/web
47+ cp -rf $hestiacp /templates/web $HESTIA /data/templates/
48+
6049
6150# Rebuilding web domains
6251for user in $( $BIN /v-list-sys-users plain) ; do
You can’t perform that action at this time.
0 commit comments