Skip to content

Commit 73a6bd0

Browse files
mamarleyFlole998
authored andcommitted
Fix echo target for superuser file in Debian postinst
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.
1 parent c420431 commit 73a6bd0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

debian/tvheadend.postinst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ configure)
5757
echo >>"$HTS_SUPERUSERCONF" "{"
5858

5959
if db_get tvheadend/admin_username; then
60-
JSONUSER=`escape_json_string $RET`
61-
echo "\"username\": $JSONUSER,"
60+
JSONUSER="$(escape_json_string "$RET")"
61+
echo >>"$HTS_SUPERUSERCONF" "\"username\": $JSONUSER,"
6262
JSONUSER=""
6363
fi
6464

6565
if db_get tvheadend/admin_password; then
66-
JSONPASS=`escape_json_string $RET`
67-
echo "\"password\": $JSONPASS"
66+
JSONPASS="$(escape_json_string "$RET")"
67+
echo >>"$HTS_SUPERUSERCONF" "\"password\": $JSONPASS"
6868
JSONPASS=""
6969
fi
70-
70+
7171
echo >>"$HTS_SUPERUSERCONF" "}"
7272
;;
7373
esac

0 commit comments

Comments
 (0)