Last active
March 17, 2020 10:47
-
-
Save geunho/70e5a65b2d00ab2f56fd0909f9ccea50 to your computer and use it in GitHub Desktop.
apt.conf 생성 및 프록시 서버 추가
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/bash | |
# | |
# Ubuntu | |
# apt.conf에 프록시 서버 설정 추가 | |
##################################### | |
PROXY_SERVER=$1 | |
if [ -z "$1" ]; then | |
echo "Usage: add_apt_proxy.sh [proxy_server]" | |
exit 0 | |
fi | |
if [ ! -d /etc/apt/apt.conf ]; then | |
echo \ | |
'Acquire::http::proxy "http://192.168.200.10:8080"; | |
Acquire::https::proxy "http://192.168.200.10:8080";' > /etc/apt/apt.conf | |
echo "add proxy server." | |
else | |
echo "check /etc/apt/apt.conf file and modify manually." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment