mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
squid: version bump and dependency fixes
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
This commit is contained in:
@@ -38,7 +38,7 @@ refresh_pattern . 0 20% 4320
|
||||
|
||||
access_log none
|
||||
cache_log /dev/null
|
||||
cache_store_log /dev/null
|
||||
cache_store_log stdio:/dev/null
|
||||
logfile_rotate 0
|
||||
|
||||
logfile_daemon /dev/null
|
||||
|
||||
@@ -3,3 +3,6 @@ config squid 'squid'
|
||||
option http_port '3128'
|
||||
option coredump_dir '/tmp/squid'
|
||||
option visible_hostname 'OpenWrt'
|
||||
#option http_port_options 'intercept'
|
||||
#option ssldb '/tmp/squid/ssldb'
|
||||
#option ssldb_options '-M 4MB'
|
||||
|
||||
@@ -12,13 +12,16 @@ validate_squid_section() {
|
||||
uci_validate_section squid squid "${1}" \
|
||||
'config_file:string' \
|
||||
'http_port:port:3128' \
|
||||
'http_port_options:string' \
|
||||
'ssldb:string' \
|
||||
'ssldb_options:string' \
|
||||
'coredump_dir:string' \
|
||||
'visible_hostname:string:OpenWrt' \
|
||||
'pinger_enable:string:off'
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local config_file http_port coredump_dir visible_hostname pinger_enable
|
||||
local config_file http_port http_port_options ssldb ssldb_options coredump_dir visible_hostname pinger_enable
|
||||
|
||||
validate_squid_section squid || {
|
||||
echo "validation failed"
|
||||
@@ -28,12 +31,15 @@ start_service() {
|
||||
config_dir=$(dirname $CONFIGFILE)
|
||||
[ -d $config_dir ] || mkdir -p $config_dir && chown nobody:nogroup $config_dir
|
||||
[ -d $coredump_dir ] || mkdir -p $coredump_dir && chown nobody:nogroup $coredump_dir
|
||||
[ "$ssldb" ] && ( [ -f "$ssldb"/size ] || /usr/lib/squid/ssl_crtd -c -s $ssldb && chown -R nobody:nogroup $ssldb )
|
||||
|
||||
cat $config_file > $CONFIGFILE
|
||||
echo http_port $http_port >> $CONFIGFILE
|
||||
echo http_port $http_port $http_port_options >> $CONFIGFILE
|
||||
echo coredump_dir $coredump_dir >> $CONFIGFILE
|
||||
echo visible_hostname $visible_hostname >> $CONFIGFILE
|
||||
echo pinger_enable $pinger_enable >> $CONFIGFILE
|
||||
[ "$ssldb" ] && echo sslcrtd_program /usr/lib/squid/ssl_crtd -s $ssldb $ssldb_options >> $CONFIGFILE
|
||||
$PROG -s -f $CONFIGFILE -N -z 2>/dev/null
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG -s -f $CONFIGFILE -N
|
||||
|
||||
Reference in New Issue
Block a user