Skip to content

Commit 5935b24

Browse files
committed
Fix wrong codename definition for ubuntu/debian.
1 parent 5e4dc4b commit 5935b24

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

install/hst-migration.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
HESTIA="/usr/local/hestia"
1313
os=$(head -n1 /etc/issue | cut -f 1 -d ' ')
14-
codename=$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))
1514
apt="/etc/apt/sources.list.d"
1615

1716
# Am I root?
@@ -33,6 +32,15 @@ if [ "$type" = "NoSupport" ]; then
3332
exit 1;
3433
fi
3534

35+
# Detect Codename
36+
if [ "$type" = "debian" ]; then
37+
codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
38+
fi
39+
40+
if [ "$type" = "ubuntu" ]; then
41+
codename="$(lsb_release -s -c)"
42+
fi
43+
3644
# Check if Vesta is installed
3745
if [ -f /usr/local/vesta/conf/vesta.conf ]; then
3846
source /usr/local/vesta/conf/vesta.conf

0 commit comments

Comments
 (0)