Skip to content

Commit

Permalink
Add compatibility for earlier Ubuntu versions
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Dec 22, 2024
1 parent 94b5d3e commit c8e5b41
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions scripts/remote-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c8e5b41

Please sign in to comment.