]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Update Debian packaging to use the new configuration directories
authorMichael Marley <michael@michaelmarley.com>
Thu, 22 Jun 2023 21:02:40 +0000 (17:02 -0400)
committerFlole998 <Flole998@users.noreply.github.com>
Fri, 23 Jun 2023 11:27:51 +0000 (13:27 +0200)
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.

debian/tvheadend.postinst
debian/tvheadend.postrm

index 1d5e60ccb9c61593527d8f4707dfc0ba82fca1ce..737b20ba30bd84c293f108f760889fd66578cd2c 100644 (file)
@@ -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}"
index 701969b04dbf9648121648df76c466464893aa49..39af2a42393016a0676bfe0472f7f79e5c433be1 100644 (file)
@@ -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
    ;;