diff options
| author | Joshua Boniface <joshua@boniface.me> | 2018-12-09 16:41:49 -0500 |
|---|---|---|
| committer | Joshua Boniface <joshua@boniface.me> | 2018-12-09 19:05:33 -0500 |
| commit | a9a798f81a836e31a8b82eab19558d9b95e7a63f (patch) | |
| tree | 668e5c59203803e7dd25c149d00dcab80151d4c9 /debian/prerm | |
| parent | c8c35864fe5dbf5027a2d1e682abd72654d309e8 (diff) | |
Rename numerous debian control elements
Replace the name emby/emby-server with jellyfin everywhere.
Diffstat (limited to 'debian/prerm')
| -rw-r--r-- | debian/prerm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/debian/prerm b/debian/prerm index 341df6cd0..af8fa1aa2 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,26 +1,26 @@ #!/bin/bash set -e -NAME=emby-server +NAME=jellyfin CONF_FILE=/etc/${NAME}.conf DEFAULT_FILE=/etc/default/${NAME} -# Source Emby server default configuration +# Source Jellyfin default configuration if [[ -f $DEFAULT_FILE ]]; then . $DEFAULT_FILE fi -# Source Emby server user configuration overrides +# Source Jellyfin user configuration overrides if [[ -f $CONF_FILE ]]; then . $CONF_FILE fi # Data directory where Emby database, cache and logs are stored -PROGRAMDATA=${EMBY_DATA-/var/lib/$NAME} +PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME} case "$1" in remove|upgrade|deconfigure) - echo "Stopping Emby Server!" + echo "Stopping Jellyfin!" # try graceful termination; if [[ -d /run/systemd/system ]]; then deb-systemd-invoke stop ${NAME}.service > /dev/null 2>&1 || true @@ -28,27 +28,27 @@ case "$1" in invoke-rc.d ${NAME} stop > /dev/null 2>&1 || true fi # Ensure that it is shutdown - PIDFILE=$(find /var/run/ -maxdepth 1 -mindepth 1 -name "emby*.pid" -print -quit) - [[ -n "$PIDFILE" ]] && [[ -s "$PIDFILE" ]] && EMBY_PID=$(cat ${PIDFILE}) + PIDFILE=$(find /var/run/ -maxdepth 1 -mindepth 1 -name "jellyfin*.pid" -print -quit) + [[ -n "$PIDFILE" ]] && [[ -s "$PIDFILE" ]] && JELLYFIN_PID=$(cat ${PIDFILE}) # if its running, let's stop it - if [[ -n "$EMBY_PID" ]]; then - # if emby is still running, kill it - if [[ -n "$(ps -p $EMBY_PID -o pid=)" ]]; then - CPIDS=$(pgrep -P $EMBY_PID) + if [[ -n "$JELLYFIN_PID" ]]; then + # if jellyfin is still running, kill it + if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then + CPIDS=$(pgrep -P $JELLYFIN_PID) sleep 2 && kill -KILL $CPIDS kill -TERM $CPIDS > /dev/null 2>&1 fi sleep 1 # if it's still running, show error - if [[ -n "$(ps -p $EMBY_PID -o pid=)" ]]; then + if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then echo "Could not successfully stop EmbyServer, please do so before uninstalling." exit 1 else [[ -f $PIDFILE ]] && rm $PIDFILE fi fi - if [[ -f /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe.so ]]; then - rm /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe.so + if [[ -f /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe.so ]]; then + rm /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe.so fi ;; failed-upgrade) |
