Skip to content

Commit 1099a80

Browse files
authored
Add LXD PPA only before Ubuntu 18.04
1 parent 902ad2b commit 1099a80

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

install.lxd.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/bin/bash
22

3-
# add LXD PPA repository
4-
sudo apt-get install -y software-properties-common
5-
sudo add-apt-repository -y ppa:ubuntu-lxc/lxd-stable
6-
sudo apt-get update
3+
RELEASE=$(lsb_release -rs | tr -d ".")
4+
if [ ${RELEASE} -lt 1804 ]; then
5+
# add LXD PPA repository
6+
sudo apt-get install -y software-properties-common
7+
sudo add-apt-repository -y ppa:ubuntu-lxc/lxd-stable
8+
sudo apt-get update
9+
fi
710

811
# install LXD
912
sudo apt-get install -y lxd

0 commit comments

Comments
 (0)