Skip to content

Instantly share code, notes, and snippets.

@geunho
Last active March 17, 2020 10:47
Show Gist options
  • Save geunho/70e5a65b2d00ab2f56fd0909f9ccea50 to your computer and use it in GitHub Desktop.
Save geunho/70e5a65b2d00ab2f56fd0909f9ccea50 to your computer and use it in GitHub Desktop.
apt.conf 생성 및 프록시 서버 추가
#!/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