Disabled Proxy by default and added custom proxy option to jeninsfile
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
#!/bin/bash
|
||||
#Allow for external definiton of status of cache
|
||||
StatusFlag=$1
|
||||
ProxyFlag=$2
|
||||
#UserSettings
|
||||
ThisScriptConfigured=no
|
||||
UseCache=no
|
||||
|
||||
#Cache enable (using apt-cacher-NG)
|
||||
CacheAlpineRepo="http://192.168.200.11/alpine/"
|
||||
CacheDebianCache="http://192.168.200.11:80"
|
||||
CacheDebianCore="http://192.168.200.11/deb.debian.org/debian"
|
||||
|
||||
#Cache server if flag not set enable (using apt-cacher-NG)
|
||||
ConfigProxyServer="192.168.200.11"
|
||||
#Cache enable (using Official MirrorServers)
|
||||
DefaultAlpineRepo="http://dl-4.alpinelinux.org/alpine/"
|
||||
DefaultDebianCore="http://deb.debian.org/debian"
|
||||
|
||||
###Do not Edit underneath###
|
||||
|
||||
if [ -n "$ProxyFlag" ]; then
|
||||
UseServer="$ProxyFlag"
|
||||
else
|
||||
UseServer="$ConfigProxyServer"
|
||||
fi
|
||||
|
||||
CacheAlpineRepo="http://$UseServer/alpine/"
|
||||
CacheDebianCache="http://$UseServer:80"
|
||||
CacheDebianCore="http://$UseServer/deb.debian.org/debian"
|
||||
|
||||
#Check if using StatusFlag if not chek if scipt is configured
|
||||
if [ -n "$StatusFlag" ]; then
|
||||
@@ -33,7 +39,7 @@ fi
|
||||
|
||||
#Check if using Cache
|
||||
if [ $UseCache = yes ]; then
|
||||
echo "Using cache server"
|
||||
echo "Using cache server $UseServer"
|
||||
AlpineRepo=$CacheAlpineRepo
|
||||
DebianCache='Acquire::http::Proxy "'$CacheDebianCache'";'
|
||||
DebianCore=$CacheDebianCore
|
||||
|
||||
Reference in New Issue
Block a user