mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-22 06:03:43 +00:00
Get the lighttpd version from dpkg-query
instead
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
7bb86e4118
commit
d30a5f1b95
1 changed files with 2 additions and 2 deletions
|
@ -1434,14 +1434,14 @@ installConfigs() {
|
||||||
install -D -m 644 -T ${PI_HOLE_LOCAL_REPO}/advanced/pihole-admin.conf $conf
|
install -D -m 644 -T ${PI_HOLE_LOCAL_REPO}/advanced/pihole-admin.conf $conf
|
||||||
|
|
||||||
# Get the version number of lighttpd
|
# Get the version number of lighttpd
|
||||||
version=$(lighttpd -v | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')
|
version=$(dpkg-query -f='${Version}\n' --show lighttpd)
|
||||||
# Test if that version is greater than or euqal to 1.4.56
|
# Test if that version is greater than or euqal to 1.4.56
|
||||||
if dpkg --compare-versions "$version" "ge" "1.4.56"; then
|
if dpkg --compare-versions "$version" "ge" "1.4.56"; then
|
||||||
# If it is, then we don't need to disable the modules
|
# If it is, then we don't need to disable the modules
|
||||||
|
# (server.modules duplication is ignored in lighttpd 1.4.56+)
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
# disable server.modules += ( ... ) in $conf to avoid module dups
|
# disable server.modules += ( ... ) in $conf to avoid module dups
|
||||||
# (server.modules duplication is ignored in lighttpd 1.4.56+)
|
|
||||||
if awk '!/^server\.modules/{print}' $conf > $conf.$$ && mv $conf.$$ $conf; then
|
if awk '!/^server\.modules/{print}' $conf > $conf.$$ && mv $conf.$$ $conf; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue