From 0e8897648c16c7c244997b148940c7ca099b3c2f Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Wed, 9 Oct 2013 10:38:34 +0300 Subject: [PATCH] work on ubuntu now --- bin/v-update-web-templates | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/v-update-web-templates b/bin/v-update-web-templates index 7fbdde7b4..ee5c5cb31 100755 --- a/bin/v-update-web-templates +++ b/bin/v-update-web-templates @@ -21,11 +21,18 @@ source $VESTA/conf/vesta.conf # Action # #----------------------------------------------------------# +# Find out OS name +if [ -e "/etc/redhat-release" ]; then + os="rhel" +else + os="ubuntu" +fi + # 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 +wget http://c.vestacp.com/$VERSION/$os/templates.tar.gz -q if [ "$?" -ne 0 ]; then echo "Error: can't download template.tar.gz" log_event "$E_CONNECT" "$EVENT"