Skip to content
Snippets Groups Projects
Commit 87775a19 authored by Bob Mottram's avatar Bob Mottram
Browse files

Also update dynamic dns on upgrades

parent 424837e5
No related branches found
No related tags found
No related merge requests found
......@@ -50,15 +50,21 @@ function item_in_array {
}
detected_codes=()
detected_codes_ctr=0
codelines=$(grep "_CODE=" "$CONFIGURATION_FILE" | uniq)
while read -r line; do
code=$(echo "$line" | awk -F '=' '{print $2}')
# shellcheck disable=SC2068
if ! item_in_array "$code" ${detected_codes[@]}; then
detected_codes+=("$code")
detected_codes_ctr=$((detected_codes_ctr+1))
fi
done <<< "$codelines"
if [ $detected_codes_ctr -eq 0 ]; then
exit 0
fi
if [ ! -d "$HOME/.freedns-update" ]; then
mkdir "$HOME/.freedns-update"
fi
......
......@@ -153,6 +153,7 @@ if [ -d "$PROJECT_DIR" ]; then
android_update_apps yes
populate_keyservers
disable_email_encryption_at_rest
/bin/bash /usr/local/bin/${PROJECT_NAME}-freedns -v
#defrag_filesystem
# reinstall tor from backports
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment