Add compatibility for earlier Ubuntu versions

This commit is contained in:
grossmj 2024-12-22 21:29:05 +07:00
parent 94b5d3e636
commit c8e5b41f39
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

@ -110,7 +110,17 @@ UBUNTU_CODENAME=`lsb_release -c -s`
log "Add GNS3 repository"
cat <<EOFLIST > /etc/apt/sources.list.d/gns3-ppa.sources
if [ -f "/etc/apt/sources.list" ]
then
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B83AAABFFBD82D21B543C8EA86C22C2EC6A24D7F
cat <<EOFLIST > /etc/apt/sources.list.d/gns3.list
deb http://ppa.launchpad.net/gns3/ppa/ubuntu $UBUNTU_CODENAME main
deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu $UBUNTU_CODENAME main
EOFLIST
else
cat <<EOFLIST > /etc/apt/sources.list.d/gns3-ppa.sources
Types: deb
URIs: https://ppa.launchpadcontent.net/gns3/$REPOSITORY/ubuntu/
Suites: $UBUNTU_CODENAME
@ -146,6 +156,8 @@ Signed-By:
-----END PGP PUBLIC KEY BLOCK-----
EOFLIST
fi
log "Updating system packages and installing curl"
apt update
apt install -y curl
@ -217,7 +229,7 @@ mkdir -p /etc/gns3
cat <<EOFC > /etc/gns3/gns3_server.conf
[Server]
host = 0.0.0.0
port = 3080
port = 3080
images_path = /opt/gns3/images
projects_path = /opt/gns3/projects
appliances_path = /opt/gns3/appliances