Skip to content

Commit

Permalink
Fix echo target for superuser file in Debian postinst
Browse files Browse the repository at this point in the history
aba5e60 was causing the username
and password to get printed to the console instead of being put in
the correct file.  Also, use the modern $() syntax instead of ``
and quote all variable assignments.
  • Loading branch information
mamarley authored and Flole998 committed Apr 26, 2024
1 parent c420431 commit 73a6bd0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions debian/tvheadend.postinst
Expand Up @@ -57,17 +57,17 @@ configure)
echo >>"$HTS_SUPERUSERCONF" "{"

if db_get tvheadend/admin_username; then
JSONUSER=`escape_json_string $RET`
echo "\"username\": $JSONUSER,"
JSONUSER="$(escape_json_string "$RET")"
echo >>"$HTS_SUPERUSERCONF" "\"username\": $JSONUSER,"
JSONUSER=""
fi

if db_get tvheadend/admin_password; then
JSONPASS=`escape_json_string $RET`
echo "\"password\": $JSONPASS"
JSONPASS="$(escape_json_string "$RET")"
echo >>"$HTS_SUPERUSERCONF" "\"password\": $JSONPASS"
JSONPASS=""
fi

echo >>"$HTS_SUPERUSERCONF" "}"
;;
esac
Expand Down

0 comments on commit 73a6bd0

Please sign in to comment.