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

Commit

Permalink
Merge pull request #188 from ludeeus/remove-duckdns
Browse files Browse the repository at this point in the history
DuckDNS: Add remove function.
  • Loading branch information
Landrash committed Oct 2, 2018
2 parents 3a89ca9 + 9af112e commit 5e6adf3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/duckdns.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Before running this script you should already have an Duck DNS account, during t
$ sudo hassbian-config install duckdns
```

# Remove
```bash
sudo hassbian-config remove duckdns
```

## Additional info
Running as: `homeassistant`

Expand Down
14 changes: 14 additions & 0 deletions package/opt/hassbian/suites/duckdns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,18 @@ fi
return 0
}

function duckdns-remove-package {
echo "Removing certificates if installed."
rm -R /home/homeassistant/dehydrated >/dev/null 2>&1

echo "Removing cron jobs"
rm /etc/cron.daily/dehydrated >/dev/null 2>&1
crontab -u homeassistant -l | grep -v 'duck.sh' | crontab -u homeassistant -

echo
echo -e "\\e[32mRemoval done..\\e[0m"
echo
return 0
}

[[ "$_" == "$0" ]] && echo "hassbian-config helper script; do not run directly, use hassbian-config instead"

0 comments on commit 5e6adf3

Please sign in to comment.