Skip to content

Commit

Permalink
Merge pull request #26 from markdumay/develop
Browse files Browse the repository at this point in the history
Version fix
  • Loading branch information
markdumay authored Sep 25, 2022
2 parents 144bbd2 + 006771a commit f4b86fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions docker-compose-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- 443:443/tcp
environment:
DNSMASQ_LISTENING: all
DNSMASQ_USER: root
TZ: ${TIMEZONE}
WEBPASSWORD: ${WEBPASSWORD}
VIRTUAL_HOST: ${DOMAIN_NAME}
Expand Down
14 changes: 8 additions & 6 deletions syno_pihole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# Title : syno_pihole.sh
# Description : Install or Update Pi-Hole as Docker Container on a Synology NAS with a Static IP Address
# Author : Mark Dumay
# Date : January 13th, 2022
# Version : 1.2.2
# Date : September 25th, 2022
# Version : 1.2.3
# Usage : sudo ./syno_pihole.sh [OPTIONS] command
# Repository : https://github.com/markdumay/synology-pihole.git
# License : MIT - https://github.com/markdumay/synology-pihole/blob/master/LICENSE
Expand All @@ -22,7 +22,7 @@ BOLD='\033[1m' #Bold color
DSM_SUPPORTED_VERSION=6
SYNO_DOCKER_SERV_NAME6=pkgctl-Docker
SYNO_DOCKER_SERV_NAME7=Docker
DEFAULT_PIHOLE_VERSION='2021.09'
DEFAULT_PIHOLE_VERSION='2022.09.4'
COMPOSE_FILE='docker-compose.yml'
TEMPLATE_FILE='docker-compose-template.yml'
GITHUB_API_PIHOLE='https://api.github.com/repos/pi-hole/docker-pi-hole/releases/latest'
Expand Down Expand Up @@ -719,7 +719,8 @@ detect_host_versions() {

#======================================================================================================================
# Defines the current and target version of Pi-hole. Exits if the installed version is already the latest version
# available, unless in force mode. The PIHOLE_TAG of the Docker container contains the version information.
# available, unless in force mode. The PIHOLE_TAG or PIHOLE_DOCKER_TAG of the Docker container contains the version
# information.
# See https://github.com/pi-hole/docker-pi-hole/releases/tag/2021.09 for more details about the version management.
# However, newer versions use PIHOLE_DOCKER_TAG. Either naming convention is accepted.
#======================================================================================================================
Expand All @@ -733,8 +734,9 @@ detect_host_versions() {
define_pihole_versions() {
print_status "Detecting current and available Pi-hole versions"

# Detect current Docker Pi-hole version (PIHOLE_TAG should comply with 'year.month[.revision]')
pihole_version=$(docker inspect "${param_pihole_hostname}" | grep -E "PIHOLE_(DOCKER_)?TAG" | grep -Eo "[0-9]+.[0-9]+(.[0-9]+)?")
# Detect current Docker Pi-hole version (PIHOLE_TAG or PIHOLE_DOCKER_TAG should comply with 'year.month[.revision]')
pihole_version=$(docker inspect -f '{{range $index, $value := .Config.Env}}{{println $value}}{{end}}' \
"${param_pihole_hostname}" | grep -E "PIHOLE_(DOCKER_)?TAG" | grep -Eo "[0-9]+.[0-9]+(.[0-9]+)?")
is_valid_version "${pihole_version}" || pihole_version=''

log "Current Pi-hole: ${pihole_version:-Unavailable}"
Expand Down

0 comments on commit f4b86fb

Please sign in to comment.