Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

DuckDNS: Fixes issue with generating certificates and validation #283

Merged
merged 1 commit into from
May 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions package/opt/hassbian/suites/duckdns/install
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function install {
echo "Changing to homeassistant user..."
sudo -u homeassistant -H /bin/bash << EOF
cd
if [ "$SSL_RESPONSE" == "y" ] || [ "$SSL_RESPONSE" == "Y" ]; then
if [ "$SSL_RESPONSE" == "0" ]; then
git clone https://github.com/lukas2511/dehydrated.git
cd dehydrated || exit
echo $DUCKDNS_DOMAIN".duckdns.org" | tee domains.txt
Expand Down Expand Up @@ -71,12 +71,11 @@ EOF
echo "Checking the installation..."
if [ "$SSL_RESPONSE" == "0" ]; then
certvalidation=$(find /home/homeassistant/dehydrated/certs/"$DUCKDNS_DOMAIN".duckdns.org/ -maxdepth 1 -type f | sort | grep privkey)
fi
if [ -f /home/homeassistant/duckdns/duck.sh ]; then
dnsvalidation="ok"
else
certvalidation="The Force will be with you. Always."
fi

if [ ! -z "${certvalidation}" ] && [ ! -z "${dnsvalidation}" ]; then
if [ ! -z "${certvalidation}" ]; then
hassbian.hassbian.suite.helper.action.success
if [ "$SSL_RESPONSE" == "0" ]; then
echo "Remember to update your configuration.yaml to take advantage of SSL!"
Expand Down