Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in step 4 and step 6 #1

Closed
samteezy opened this issue Sep 28, 2020 · 3 comments
Closed

Error in step 4 and step 6 #1

samteezy opened this issue Sep 28, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@samteezy
Copy link

samteezy commented Sep 28, 2020

I receive the following error when running the script for install as sudo:

Step 4 from 8: Generating Docker Compose file
sed: -e expression #1, char 53: unterminated `s' command

However, it continues though to step 6:

Step 6 from 8: Creating Pi-hole container
The TIMEZONE variable is not set. Defaulting to a blank string.
Creating network "synology-pihole_macvlan" with driver "macvlan"
Creating pihole ... error

ERROR: for pihole Cannot start service pihole: b"Bind mount failed: '/volume1/homes/sam/synology-pihole/data/dnsmasq.d' does not exists"

ERROR: for pihole Cannot start service pihole: b"Bind mount failed: '/volume1/homes/sam/synology-pihole/data/dnsmasq.d' does not exists"
Encountered errors while bringing up the project.
ERROR: Could not create Docker network and/or container

At this point the script exits.

@markdumay markdumay added the bug Something isn't working label Sep 28, 2020
@markdumay
Copy link
Owner

Looking at the console output you shared, step 4 seems to have an error with the safe_replace_in_file() function, called by create_docker_compose_file(). Would you mind sharing your command-line parameters and/or .env file?

Seemingly there are additional issues too. The timezone is also empty - what does the following command return on your NAS?

find /usr/share/zoneinfo/ -type f -exec sh -c "diff -q /etc/localtime '{}' \
>             > /dev/null && echo {}" \; | sed 's|/usr/share/zoneinfo/||g'

And lastly, it also appears the folder /volume1/homes/sam/synology-pihole/data/dnsmasq.d is not created properly. The script should create /volume1/homes/sam/synology-pihole/data/, and Docker compose should create the subfolders pihole and dnsmasq.d. It might be Docker compose has different behavior across versions. I'll add an issue to have the script create these two sub directories instead.

@markdumay
Copy link
Owner

I submitted a code change to the develop branch to tackle the missing subfolders. You can find it here:

git clone https://github.com/markdumay/synology-pihole.git -b develop

@markdumay
Copy link
Owner

Closed due to inactivity

markdumay pushed a commit that referenced this issue Feb 17, 2021
* Update syno_pihole.sh

Initial (incomplete) commit for refining network configuration.

* Remainder of initial re-working of networking logic and miscellainious changes. Untested commit.

* Fixed check subnet code in validate_settings function.

* Fixed prefix size comparison error in function is_cidr_in_subnet.

* Added PARAM_HOST_IP check to validate_settings function. Fixed bug in function init_generated_values causing PARAM_HOST_IP not to be properly generated.

* Fixed second bug in init_generated_values function - calling the int to ip conversion outside the appropriate conditional statement.

* Fixed syntax error in function init_generated_values - comparison of variable integer equality.

* Resolved final syntax error in function init_generated_values to make it functional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants