Created
June 7, 2020 11:35
-
-
Save jcxldn/0e8706b7e37de65fc62b0d30f668bb30 to your computer and use it in GitHub Desktop.
jcx-switch-mirrors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# -------------------------------------------------- | |
# JCX CF CDN for Ubuntu | |
# -------------------------------------------------- | |
# 1. Installs 'ca-certificates' if not available. | |
# 2. Switches mirrors. | |
# 3. Removes apt list caches. (Useful for docker!) | |
# -------------------------------------------------- | |
# SUPPORTED MIRRORS | |
# -------------------------------------------------- | |
# archive.ubuntu.com | |
# security.ubuntu.com | |
# ports.ubuntu.com | |
# old-releases.ubuntu.com | |
# -------------------------------------------------- | |
apt-get update && apt-get install -y ca-certificates && sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/ubuntu-cf-cdn.jcx.ovh/;s/http:\/\/security.ubuntu.com/https:\/\/ubuntu-security-cf-cdn.jcx.ovh/;s/http:\/\/ports.ubuntu.com/https:\/\/ubuntu-ports-cf-cdn.jcx.ovh/;s/http:\/\/old-releases.ubuntu.com/https:\/\/ubuntu-old-releases-cf-cdn.jcx.ovh/' /etc/apt/sources.list && rm -rf /var/lib/apt/lists/* | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment