From: Michael Marley Date: Fri, 26 Apr 2024 17:50:17 +0000 (-0400) Subject: Fix echo target for superuser file in Debian postinst X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73a6bd00d29421da04be5e1c41b2097fdc9c148b;p=thirdparty%2Ftvheadend.git 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. --- 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