aboutsummaryrefslogtreecommitdiff
path: root/debian/postrm
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-10 19:45:21 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-10 19:45:30 +0100
commit399a079dd472a0ad424884eb48a0d9e471a95c70 (patch)
tree43bd338b79f1243dbe7f4f07ca63f1b5363724fb /debian/postrm
parent3d867c2c46cec39b669bb8647efef677f32b8a8d (diff)
Build scripts and build system consolidation.
Squashed commit.
Diffstat (limited to 'debian/postrm')
-rw-r--r--debian/postrm75
1 files changed, 0 insertions, 75 deletions
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100644
index 690f5d587e..0000000000
--- a/debian/postrm
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-set -e
-
-NAME=jellyfin
-DEFAULT_FILE=/etc/default/${NAME}
-
-# Source Jellyfin default configuration
-if [[ -f $DEFAULT_FILE ]]; then
- . $DEFAULT_FILE
-fi
-
-# Data directories for program data (cache, db), configs, and logs
-PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
-CONFIGDATA=${JELLYFIN_CONFIG_DIRECTORY-/etc/$NAME}
-LOGDATA=${JELLYFIN_DATA_DIRECTORY-/var/log/$NAME}
-
-# In case this system is running systemd, we make systemd reload the unit files
-# to pick up changes.
-if [[ -d /run/systemd/system ]] ; then
- systemctl --system daemon-reload >/dev/null || true
-fi
-
-case "$1" in
- purge)
- echo PURGE | debconf-communicate $NAME > /dev/null 2>&1 || true
-
- if [[ -x "/etc/init.d/jellyfin" ]] || [[ -e "/etc/init/jellyfin.connf" ]]; then
- update-rc.d jellyfin remove >/dev/null 2>&1 || true
- fi
-
- if [[ -x "/usr/bin/deb-systemd-helper" ]]; then
- deb-systemd-helper purge jellyfin.service >/dev/null
- deb-systemd-helper unmask jellyfin.service >/dev/null
- fi
-
- # Remove user and group
- userdel jellyfin > /dev/null 2>&1 || true
- delgroup --quiet jellyfin > /dev/null 2>&1 || true
- # Remove config dir
- if [[ -d $CONFIGDATA ]]; then
- rm -rf $CONFIGDATA
- fi
- # Remove log dir
- if [[ -d $LOGDATA ]]; then
- rm -rf $LOGDATA
- fi
- # Remove program data dir
- if [[ -d $PROGRAMDATA ]]; then
- rm -rf $PROGRAMDATA
- fi
- # Remove binary symlink
- [[ -f /usr/bin/jellyfin ]] && rm /usr/bin/jellyfin
- # Remove sudoers config
- [[ -f /etc/sudoers.d/jellyfin-sudoers ]] && rm /etc/sudoers.d/jellyfin-sudoers
- # Remove anything at the default locations; catches situations where the user moved the defaults
- [[ -e /etc/jellyfin ]] && rm -rf /etc/jellyfin
- [[ -e /var/log/jellyfin ]] && rm -rf /var/log/jellyfin
- [[ -e /var/lib/jellyfin ]] && rm -rf /var/lib/jellyfin
- ;;
- remove)
- if [[ -x "/usr/bin/deb-systemd-helper" ]]; then
- deb-systemd-helper mask jellyfin.service >/dev/null
- fi
- ;;
- upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0