From: Michael Marley Date: Thu, 22 Jun 2023 21:02:40 +0000 (-0400) Subject: Update Debian packaging to use the new configuration directories X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9958c34210f21b6a7487e3df899230df3a545489;p=thirdparty%2Ftvheadend.git Update Debian packaging to use the new configuration directories This updates the Debian packaging to use the new configuration directories introduced by https://github.com/tvheadend/tvheadend/pull/1535 and https://github.com/tvheadend/tvheadend/pull/1538. Instead of being in /home/hts/.hts/tvheadend, the configuration will now be stored in /var/lib/tvheadend by default, which is consistent with how many other "server"-style Debian packages handle their home directories and configuration. --- diff --git a/debian/tvheadend.postinst b/debian/tvheadend.postinst index 1d5e60ccb..737b20ba3 100644 --- a/debian/tvheadend.postinst +++ b/debian/tvheadend.postinst @@ -10,16 +10,14 @@ configure) if ! getent passwd $HTS_USER >/dev/null; then echo >&2 "Creating user: $HTS_USER..." - adduser --quiet --system --group --shell /bin/bash $HTS_USER + adduser --quiet --system --group --home /var/lib/tvheadend $HTS_USER fi HTS_HOME=`getent passwd $HTS_USER | cut -d':' -f6` - mkdir -p "${HTS_HOME}/.hts/tvheadend" - chown ${HTS_USER}:${HTS_USER} "${HTS_HOME}/.hts" - chown ${HTS_USER}:${HTS_USER} "${HTS_HOME}/.hts/tvheadend" + install -d -g ${HTS_USER} -o ${HTS_USER} "${HTS_HOME}/recordings" - HTS_SUPERUSERCONF="${HTS_HOME}/.hts/tvheadend/superuser" + HTS_SUPERUSERCONF="${HTS_HOME}/superuser" rm -f "${HTS_SUPERUSERCONF}" touch "${HTS_SUPERUSERCONF}" chmod 600 "${HTS_SUPERUSERCONF}" diff --git a/debian/tvheadend.postrm b/debian/tvheadend.postrm index 701969b04..39af2a423 100644 --- a/debian/tvheadend.postrm +++ b/debian/tvheadend.postrm @@ -9,7 +9,7 @@ case "$1" in purge) if getent passwd $HTS_USER >/dev/null; then HTS_HOME=`getent passwd $HTS_USER | cut -d':' -f6` - rm -rf "${HTS_HOME}/.hts/tvheadend" + rm -rf "${HTS_HOME}" fi db_purge ;;