From 73a6bd00d29421da04be5e1c41b2097fdc9c148b Mon Sep 17 00:00:00 2001 From: Michael Marley Date: Fri, 26 Apr 2024 13:50:17 -0400 Subject: [PATCH] Fix echo target for superuser file in Debian postinst aba5e60792177d6a2a867445559f4806973b3258 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. --- debian/tvheadend.postinst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/tvheadend.postinst b/debian/tvheadend.postinst index 652f311b3..95def43f5 100644 --- a/debian/tvheadend.postinst +++ b/debian/tvheadend.postinst @@ -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 -- 2.47.2