Remove commit if the old inadyn binary is found

This commit is contained in:
Bob Mottram 2018-05-12 18:49:19 +01:00
parent 0dbb5c0c6c
commit 105c2a78e3
1 changed files with 6 additions and 3 deletions

View File

@ -489,6 +489,12 @@ function install_dynamicdns {
sed -i '/INADYN_COMMIT/d' "$CONFIGURATION_FILE"
fi
if [ -f /usr/local/sbin/inadyn ]; then
if grep -q "inadyn commit" "$COMPLETION_FILE"; then
sed -d '/inadyn commit/d' "$COMPLETION_FILE"
fi
fi
CURR_INADYN_COMMIT=$(get_completion_param "inadyn commit")
echo "************ 3 $CURR_INADYN_COMMIT $INADYN_COMMIT"
if [[ "${CURR_INADYN_COMMIT}" == "${INADYN_COMMIT}" ]]; then
@ -497,9 +503,6 @@ function install_dynamicdns {
echo "************ 4"
if [ -f /usr/local/sbin/inadyn ]; then
if grep -q "inadyn commit" "$COMPLETION_FILE"; then
sed -d '/inadyn commit/d' "$COMPLETION_FILE"
fi
if [ -d "$INSTALL_DIR/inadyn" ]; then
rm -rf "$INSTALL_DIR/inadyn"
fi