Skip to content

Commit f78d3e2

Browse files
author
Kristan Kenney
committed
Fix path in template update scripts
1 parent 0b5e021 commit f78d3e2

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

bin/v-update-dns-templates

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ case $(head -n1 /etc/issue | cut -f 1 -d ' ') in
2424
esac
2525

2626
# Detect version
27-
if [ "$type" = "ubuntu" ]; then
28-
release="$(lsb_release -s -r)"
29-
elif [ "$type" = "ubuntu" ]; then
30-
release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
27+
if [ "$type" = "ubuntu" ] || [ "$type" = "debian" ]; then
28+
type="deb"
3129
else
3230
echo "Error: can't detect supported os"
3331
log_event "$E_NOTEXIST"
@@ -40,7 +38,7 @@ fi
4038
#----------------------------------------------------------#
4139

4240
# Update templates
43-
cp -rf $HESTIA/install/$type/$release/templates/dns $HESTIA/data/templates/
41+
cp -rf $HESTIA/install/$type/templates/dns $HESTIA/data/templates/
4442

4543

4644
#----------------------------------------------------------#

bin/v-update-web-templates

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ case $(head -n1 /etc/issue | cut -f 1 -d ' ') in
2424
esac
2525

2626
# Detect version
27-
if [ "$type" = "ubuntu" ]; then
28-
release="$(lsb_release -s -r)"
29-
elif [ "$type" = "debian" ]; then
30-
release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
27+
if [ "$type" = "ubuntu" ] || [ "$type" = "debian" ]; then
28+
type="deb"
3129
else
3230
echo "Error: can't detect supported os"
3331
log_event "$E_NOTEXIST"
@@ -40,7 +38,7 @@ fi
4038
#----------------------------------------------------------#
4139

4240
# Update templates
43-
cp -rf $HESTIA/install/$type/$release/templates/web $HESTIA/data/templates/
41+
cp -rf $HESTIA/install/$type/templates/web $HESTIA/data/templates/
4442

4543
# Rebuilding web domains
4644
for user in $($BIN/v-list-sys-users plain); do

0 commit comments

Comments
 (0)