aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules6
-rw-r--r--CONTRIBUTORS.md11
-rw-r--r--LICENSE (renamed from LICENSE.md)0
-rw-r--r--README.md100
-rw-r--r--debian/bin/emby-server121
-rw-r--r--debian/bin/jellyfin-sudoers37
-rw-r--r--debian/bin/restart.sh (renamed from debian/restart.sh)2
-rw-r--r--debian/changelog6
-rw-r--r--debian/conf/jellyfin37
-rw-r--r--debian/conf/jellyfin.conf24
-rw-r--r--debian/control12
-rw-r--r--debian/copyright7
-rw-r--r--debian/emby37
-rw-r--r--debian/emby-server.conf24
-rw-r--r--debian/emby-server.emby-server.default37
-rw-r--r--debian/emby-server.emby-server.init88
-rw-r--r--debian/emby-server.emby-server.service12
-rw-r--r--debian/install10
-rw-r--r--debian/jellyfin.init44
-rw-r--r--debian/jellyfin.service12
-rw-r--r--debian/jellyfin.upstart (renamed from debian/emby-server.emby-server.upstart)9
-rw-r--r--debian/po/templates.pot20
-rw-r--r--debian/postinst51
-rw-r--r--debian/postrm30
-rw-r--r--debian/preinst30
-rw-r--r--debian/prerm32
-rwxr-xr-xdebian/rules10
-rw-r--r--debian/source.lintian-overrides4
28 files changed, 293 insertions, 520 deletions
diff --git a/.gitmodules b/.gitmodules
index ada3ae4bb..a8dd93d6d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,9 +1,9 @@
[submodule "Emby.XmlTv"]
path = Emby.XmlTv
- url = https://github.com/JustAMan/Emby.XmlTv.git
+ url = https://github.com/jellyfin/Emby.XmlTv.git
[submodule "ImageMagickSharp"]
path = ImageMagickSharp
- url = https://github.com/JustAMan/ImageMagickSharp.git
+ url = https://github.com/jellyfin/ImageMagickSharp.git
[submodule "Emby.IsoMounting"]
path = Emby.IsoMounting
- url = https://github.com/JustAMan/Emby.IsoMounting.git
+ url = https://github.com/jellyfin/Emby.IsoMounting.git
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 7ae4ca178..fd9bab8cc 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -1,4 +1,11 @@
-# Contributors
+# Jellyfin Contributors
+
+ - [JoshuaBoniface](https://github.com/joshuaboniface)
+ - [nvllsvm](https://github.com/nvllsvm)
+ - [JustAMan](https://github.com/JustAMan)
+ - [dcrdev](https://github.com/dcrdev)
+
+# Emby Contributors
- [LukePulverenti](https://github.com/LukePulverenti)
- [ebr11](https://github.com/ebr11)
@@ -59,4 +66,4 @@
- [mporcas](https://github.com/mporcas)
- [tikuf](https://github.com/tikuf/)
- [Tim Hobbs](https://github.com/timhobbs)
- - [SvenVandenbrande](https://github.com/SvenVandenbrande) \ No newline at end of file
+ - [SvenVandenbrande](https://github.com/SvenVandenbrande)
diff --git a/LICENSE.md b/LICENSE
index 4522ba065..4522ba065 100644
--- a/LICENSE.md
+++ b/LICENSE
diff --git a/README.md b/README.md
index 972e95710..6911607ae 100644
--- a/README.md
+++ b/README.md
@@ -1,98 +1,22 @@
-Emby Server
+Jellyfin
============
-Emby Server is a personal media server with apps on just about every device.
+Jellyfin is a personal media server. The Jellyfin project was started as a result of Emby's decision to take their code closed-source, as well as various philosophical differences with the core developers. Jellyfin seeks to be the free software alternative to Emby and Plex to provide media management and streaming from a dedicated server to end-user devices.
-It features a REST-based API with built-in documentation to facilitate client development. We also have client libraries for our API to enable rapid development.
+Jellyfin is descended from Emby 3.5.2, ported to the .NET Core framework, and aims to contain build facilities for every platform.
-This repository is a hard fork of Emby 3.4.1.18 which unlocks Premium status by default and includes a buildable source repository for Debian and other package types.
+For further details, please see [our wiki](https://github.com/jellyfin/jellyfin/wiki) and join [our public chat on Matrix/Riot](https://matrix.to/#/#jellyfin:matrix.org).
-## Rationale from JustAMan
-I want to have a fresh enough build based on NetCore (not on a Mono which is being deprecated) with unlocked features.
-It's dangerous here, so I'm taking the power of GPL with me and work of other mighty Github users to make this happen.
+## Building Jellyfin packages
----
-Now the readme of previous fork follows.
+Jellyfin seeks to integrate build facilities for any desired packaging format. Instructions for the various formats can be found below.
-## Rationale
+### Debian/Ubuntu
-I will start by saying I am only an Emby user and a professional sysadmin who lightly dabbles in Python. This is the story of why I'm forking Emby completely and forming a separate project.
+Debian build facilities are integrated into the repo at `debian/`.
-In 2015, I and a number of other users requested LDAP support for Emby. I had been trying it out for about a year, as I was specifically looking for a Free Software alternative to Plex. This was the last missing feature for me, and one that I viewed as simple and critical to any piece of authenticated web-based software. I was also very willing to support the project with a premium membership when it fit my last need, so I waited patiently.
-
-Emby continued to operate and update as it did until 2017. During this time however the Emby team began taking various extensions, as well as all mobile apps, out of their public repositories. I'm at this point still unsure of their status. This raised suspicion on my part but alone is legitimate. However in light of future events it certainly appears part of a pattern. The LDAP issue in particular also lingered, with numerous delays due to seemingly unrelated code changes and a number of noncommittal responses from the developers as to the status of the feature.
-
-In the early part of 2017, the core developers added a nag screen. While the details are disputed, what I can say for certain is that for at least one minor version release, I was experiencing a 10 second nagscreen prompting me to purchase a Premium licence, before *almost every* video I watched. The developers had intended this to be once every 24 hours, but in either case I was extremely disappointed in this obviously-user-hostile "feature". Further investigation into the Emby user forums as well as GitHub showed an extremely stark and, to me, chilling attitude from the core developers and the premium-paid community: an attitude that the developers can and should be making money off of Emby, a GPL project that, to my knowledge, was gifted to the current developers under this license in the past, by any means necessary; and a hostile contempt towards any user who dared criticize this decision (specifically new users, non-premium, who were testing Emby or who had no desire for the Premium features).
-
-This attitude was further demonstrated in the response to the issue on GitHub, where the developers appeared openly hostile to any criticism, though without the echo-chamber of the user forums to police the critics. The nagscreen was eventually removed, however the stain of this behaviour and attitude remained apparent.
-
-In late 2017, it was then discovered that there were possible violations of the GPL license within the projects main repository. Specifically, a number of binary-only DLL files to which no source was provided and that the project would not build without; these files are at this time sill present in this repository as well. There was further hostility and outright evasiveness on the part of the lead developer to answering simple questions regarding the license status of these components, with delayed, terse, and noncommittal answers.
-
-At long last earlier this year, the LDAP feature was released - as a Premium-only plugin. And issues of source control and user builds finally came to a head with the 3.5.0 version, which split several components of the source package into separate repositories. Public access to these repositories was not granted for some time, with further noncommittal and evasive answers from the Emby developers, preventing users from building this release. While this situation was eventually rectified, for me this was the last straw.
-
-In light of these actions, I believe that the core Emby developers do not respect the Free Software community that their project implies it is a part of, nor do they respect their gratis users. The developers seek to monetize this project, as is their right, but their methods are overbearing, arbitrary, and demonstrate contempt for users who choose them because they are a Free Software project, including package maintainers and contributors, while outright demanding via extortion payment for their product. For these reasons, I do not believe they are good stewards of the project, and this fork seeks to build an alternative to them in the Free Software space, while declaring to always remain both gratis and libre and respect its community.
-
-I welcome any feedback, forks, or pull requests.
-
- * Joshua
-
-## Building the Debian package
-
-Enter the repository directory and run `dpkg-buildpackage -us -uc -jX`, where X is your core count. It will take some time to build and has many dependencies, especially `mono-devel` version 5.18 or newer. Obtain the latest version by using the [instructions here](https://www.mono-project.com/download/stable/#download-lin-debian).
-
-A huge thanks to Carlos Hernandez who created the Debian build configuration for Emby 3.1.1, which is forward-ported to 3.4.1 in this repository. His repository is [here](https://download.opensuse.org/repositories/home:/emby/Debian_9.0/) and contains stock packages for the 3.1.1 release.
-
----
-
-The original README follows
-
----
-
-## Emby Apps
-
-- [Android Mobile (Play Store)](https://play.google.com/store/apps/details?id=com.mb.android "Android Mobile (Play Store)")
-- [Android Mobile (Amazon)](http://www.amazon.com/Emby-for-Android/dp/B00GVH9O0I "Android Mobile (Amazon)")
-- [Android TV](https://play.google.com/store/apps/details?id=tv.emby.embyatv "Android TV")
-- [Amazon Fire TV](http://www.amazon.com/Emby-for-Fire-TV/dp/B00VVJKTW8 "Amazon Fire TV")
-- [HTML5](http://app.emby.media "HTML5")
-- [iPad](https://itunes.apple.com/us/app/emby/id992180193?ls=1&mt=8 "iPad")
-- [iPhone](https://itunes.apple.com/us/app/emby/id992180193?ls=1&mt=8 "iPhone")
-- [Kodi](http://emby.media/download/ "Kodi")
-- [Media Portal](http://www.team-mediaportal.com/ "Media Portal")
-- [Roku](https://www.roku.com/channels#!details/44191/emby "Roku")
-- [Windows Desktop](http://emby.media/download/ "Windows Desktop")
-- [Windows Media Center](http://emby.media/download/ "Windows Media Center")
-- [Windows Phone](http://www.windowsphone.com/s?appid=f4971ed9-f651-4bf6-84bb-94fd98613b86 "Windows Phone")
-- [Windows 8](http://apps.microsoft.com/windows/en-us/app/media-browser/ad55a2f0-9897-47bd-8944-bed3aefd5d06 "Windows 8.1")
-
-## New Users ##
-
-If you're a new user looking to install Emby Server, please head over to [emby.media](http://www.emby.media/ "emby.media")
-
-## Developer Info ##
-
-[Api Docs](https://github.com/MediaBrowser/MediaBrowser/wiki "Api Workflow")
-
-[How to Build a Server Plugin](https://github.com/MediaBrowser/MediaBrowser/wiki/How-to-build-a-Server-Plugin "How to build a server plugin")
-
-
-## Visit our community: ##
-
-http://emby.media/community
-
-## Images
-
-![Android](https://dl.dropboxusercontent.com/u/4038856/android1.png)
-![Android](https://dl.dropboxusercontent.com/u/4038856/android2.png)
-![Html5](https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/apps/html5.png)
-![iOS](https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/apps/ios_1.jpg)
-![iOS](https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/apps/ios_2.jpg)
-![Emby Theater](https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/apps/mbt.png)
-![Emby Theater](https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/apps/mbt1.png)
-![Windows Phone](https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/apps/winphone.png)
-![Roku](https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/apps/roku2.jpg)
-![iOS](https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/apps/ios_3.jpg)
-![Dashboard](https://raw.github.com/MediaBrowser/MediaBrowser.Resources/master/apps/dashboard.png)
-![iOS](http://i.imgur.com/prrzxMc.jpg)
-![iOS](http://i.imgur.com/c9Vd1w5.jpg)
+1. Install the `dotnet-sdk-2.1` package via [Microsoft's repositories](https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-2.1.500).
+2. Run `dpkg-buildpackage -us -uc -jX`, where X is your core count.
+3. Install the resulting `jellyfin*.deb` file on your system.
+A huge thanks to Carlos Hernandez who created the Debian build configuration for Emby 3.1.1.
diff --git a/debian/bin/emby-server b/debian/bin/emby-server
deleted file mode 100644
index 704e37158..000000000
--- a/debian/bin/emby-server
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/bash
-# vim:set ft=sh sw=2 sts=2 st=2 et:
-# Author: HurricaneHernandez <carlos@techbyte.ca>
-# Modified for CentOS/Fedora by: FC7 <casasfernando@outlook.com>
-
-DESC=EmbyServer
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-NAME=emby-server
-CONF_FILE=/etc/${NAME}.conf
-DEFAULT_FILE=/etc/default/${NAME}
-SCRIPTNAME=/usr/bin/emby-server
-
-# Source Emby server default configuration
-. $DEFAULT_FILE
-
-# Source Emby server user configuration overrides
-if [[ -f $CONF_FILE ]]; then
- . $CONF_FILE
-else
- echo "${CONF_FILE} not found using default settings.";
-fi
-
-# Ensure the runas user has restart privilege to restart the service if not try to add the user to emby group. WARN on failure
-if [[ "$EMBY_USER" != "emby" ]]; then
- groups $EMBY_USER | grep -q emby
- if [[ $? -ne 0 ]]; then
- if [[ $EUID -eq 0 ]]; then
- usermod -a -G emby $EMBY_USER
- else
- echo "WARNING: The runas user is not part of emby group and you don't have enough privileges to add it. The restart button in the GUI will probably fail."
- echo "To solve this start the emby-server service using the startup scripts (systemd/sysv) or"
- echo "add the runas user ($EMBY_USER) to the emby group manually and restart Emby."
- fi
- fi
-fi
-
-# Data directory where Emby database, cache and logs are stored
-PROGRAMDATA=$EMBY_DATA
-PROGRAMDATA_OPT="-programdata $PROGRAMDATA"
-
-# Path to store PID file
-PIDFILE=$EMBY_PIDFILE
-
-# Full path of Emby binary
-EMBY_EXEC=$EMBY_BIN
-
-# Path of emby program files
-EMBY_PATH=$EMBY_DIR
-
-# path to mono bin
-MONO_EXEC=$MONO_BIN
-
-# umask
-UMASK=${UMASK:-002}
-
-# Mono environment variables
-MAGICK_HOME_ENV="MAGICK_HOME=${EMBY_PATH}"
-EMBY_LIBRARY_PATH=$(find /usr/lib/emby-server/ -maxdepth 1 -mindepth 1 -type d| grep -v bin | grep -v etc | grep -v -e "/\.")
-MAGICK_CODER_FILTER_PATH_ENV="MAGICK_CODER_FILTER_PATH=$(find ${EMBY_LIBRARY_PATH} -type d -name "filters" | grep EmbyMagick)"
-MAGICK_CODER_MODULE_PATH_ENV="MAGICK_CODER_MODULE_PATH=$(find ${EMBY_LIBRARY_PATH} -type d -name "coders" | grep EmbyMagick)"
-MONO_EXEC_ENV="$MONO_ENV ${EMBY_LIBRARY_PATH:+"LD_LIBRARY_PATH=${EMBY_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"}"
-
-# Mono options
-MONO_EXEC_OPTS=$MONO_OPTS
-
-# restart function
-RESTART_OPTS="-restartpath ${EMBY_PATH}/restart.sh"
-
-# Emby options
-EMBY_OPTS="$PROGRAMDATA_OPT $RESTART_OPTS $EMBY_ADD_OPTS"
-
-PID_PATH=$(dirname $PIDFILE)
-
-# Exit if the mono-sgen not installed
-if [[ ! -x $MONO_EXEC ]]; then
- if [[ -n "$(command -v mono-sgen)" ]]; then
- MONO_EXEC=$(command -v mono-sgen)
- else
- MONO_EXEC=$(command -v mono)
- fi
-fi
-
-# Create programdata directory if not exist and ensure the emby user can write to it
-if [[ ! -d $PROGRAMDATA ]]; then
- if [[ $EUID -eq 0 ]]; then
- mkdir -p $PROGRAMDATA
- else
- echo "WARNING: $EMBY_DATA directory does not exist."
- echo "To solve this, if it is an upgrade verify that \"EMBY_DATA\" is set to the correct path in /etc/emby-server.conf."
- echo "You may need to locate the path of your library files and set EMBY_DATA to that path."
- echo "If this is an new installation please rerun last command with elevated permissions."
- fi
-fi
-
-# Set right permission for directories
-DATA_CURRENT_USER=$(ls -lad $PROGRAMDATA | awk '{print $3}')
-
-if [[ "$DATA_CURRENT_USER" != "$EMBY_USER" ]]; then
- if [[ $EUID -eq 0 ]]; then
- chown -R $EMBY_USER.$EMBY_GROUP $PROGRAMDATA
- else
- echo "WARNING: $EMBY_DATA directory does not have the correct permissions."
- echo "Please rerun this script with elevated permissions."
- fi
-fi
-
-case "$1" in
- start)
- echo $$ > $PIDFILE
- exec su -s /bin/sh -c 'umask $0; exec "$1" "$@"' $EMBY_USER -- \
- $UMASK env $MAGICK_HOME_ENV $MAGICK_CODER_FILTER_PATH_ENV $MAGICK_CODER_MODULE_PATH_ENV \
- $MONO_EXEC_ENV $MONO_EXEC $MONO_EXEC_OPTS $EMBY_EXEC $EMBY_OPTS
- ;;
- clear)
- [[ -e $PIDFILE ]] && rm -rf $PIDFILE
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|clear}" >&2
- exit 3
- ;;
-esac
diff --git a/debian/bin/jellyfin-sudoers b/debian/bin/jellyfin-sudoers
new file mode 100644
index 000000000..4eb91366b
--- /dev/null
+++ b/debian/bin/jellyfin-sudoers
@@ -0,0 +1,37 @@
+#Allow jellyfin group to start, stop and restart itself
+Cmnd_Alias RESTARTSERVER_SYSV = /sbin/service jellyfin restart, /usr/sbin/service jellyfin restart
+Cmnd_Alias STARTSERVER_SYSV = /sbin/service jellyfin start, /usr/sbin/service jellyfin start
+Cmnd_Alias STOPSERVER_SYSV = /sbin/service jellyfin stop, /usr/sbin/service jellyfin stop
+Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemctl restart jellyfin, /bin/systemctl restart jellyfin
+Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start jellyfin, /bin/systemctl start jellyfin
+Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop jellyfin, /bin/systemctl stop jellyfin
+Cmnd_Alias RESTARTSERVER_INITD = /etc/init.d/jellyfin restart
+Cmnd_Alias STARTSERVER_INITD = /etc/init.d/jellyfin start
+Cmnd_Alias STOPSERVER_INITD = /etc/init.d/jellyfin stop
+
+
+%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSV
+%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSV
+%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSV
+%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD
+%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD
+%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD
+%jellyfin ALL=(ALL) NOPASSWD: RESTARTSERVER_INITD
+%jellyfin ALL=(ALL) NOPASSWD: STARTSERVER_INITD
+%jellyfin ALL=(ALL) NOPASSWD: STOPSERVER_INITD
+
+Defaults!RESTARTSERVER_SYSV !requiretty
+Defaults!STARTSERVER_SYSV !requiretty
+Defaults!STOPSERVER_SYSV !requiretty
+Defaults!RESTARTSERVER_SYSTEMD !requiretty
+Defaults!STARTSERVER_SYSTEMD !requiretty
+Defaults!STOPSERVER_SYSTEMD !requiretty
+Defaults!RESTARTSERVER_INITD !requiretty
+Defaults!STARTSERVER_INITD !requiretty
+Defaults!STOPSERVER_INITD !requiretty
+
+#Allow the server to mount iso images
+%jellyfin ALL=(ALL) NOPASSWD: /bin/mount
+%jellyfin ALL=(ALL) NOPASSWD: /bin/umount
+
+Defaults:%jellyfin !requiretty
diff --git a/debian/restart.sh b/debian/bin/restart.sh
index 4d83624a0..a6f4632ba 100644
--- a/debian/restart.sh
+++ b/debian/bin/restart.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-NAME=emby-server
+NAME=jellyfin
restart_cmds=("s6-svc -t /var/run/s6/services/${NAME}" \
"systemctl restart ${NAME}" \
diff --git a/debian/changelog b/debian/changelog
index 6ebb6a0cc..9199f71fc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+jellyfin (3.5.2) unstable; urgency=medium
+
+ * Rename from emby-server on version 3.5.2
+
+ -- Joshua Boniface <joshua@boniface.me> Sun, 9 Dec 2018 15:20:58 -0400
+
emby-server (3.5.2-unlocked) unstable; urgency=medium
* Taking changes from upstream 3.5.2, beautifying some JS files
diff --git a/debian/conf/jellyfin b/debian/conf/jellyfin
new file mode 100644
index 000000000..57f424c06
--- /dev/null
+++ b/debian/conf/jellyfin
@@ -0,0 +1,37 @@
+# Defaults for jellyfin initscript
+# sourced by /etc/init.d/jellyfin and /usr/lib/jellyfin/jellyfin.sh
+# installed at /etc/default/jellyfin by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+## Don't edit this file
+## Edit user configuration in /etc/jellyfin.conf to change
+##
+## JELLYFIN_USER= #$JELLYFIN_USER, username to run Jellyfin under, the default is jellyfin
+## JELLYFIN_GROUP= #$JELLYFIN_GROUP, Jellyfin group where Jellyfin user belongs
+## JELLYFIN_DIR= #$JELLYFIN_DIR, the location of Jellyfin program files the default is /usr/lib/jellyfin
+## JELLYFIN_BIN= #$JELLYFIN_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe
+## JELLYFIN_DATA= #$JELLYFIN_DATA, the location of Jellyfin data, cache, logs, the default is /var/lib/jellyfin
+## JELLYFIN_PIDFILE= #$JELLYFIN_PIDFILE, the location of jellyfin.pid, the default is /var/run/jellyfin/jellyfin.pid
+## JELLYFIN_ADD_OPTS= #$JELLYFIN_ADD_OPTS, additional options to pass to the Jellyfin executable, beyond ffmpeg, ffprobe and restart
+## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
+## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
+## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
+##
+## EXAMPLE if want to run as different user
+## add JELLYFIN_USER=username to /etc/jellyfin.conf
+## otherwise default jellyfin is used
+
+JELLYFIN_USER="jellyfin"
+JELLYFIN_GROUP="jellyfin"
+JELLYFIN_DIR="/usr/lib/jellyfin"
+JELLYFIN_BIN="/usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe"
+JELLYFIN_DATA="/var/lib/jellyfin"
+JELLYFIN_PIDFILE="/var/run/jellyfin.pid"
+JELLYFIN_ADD_OPTS=""
+MONO_BIN="/usr/bin/mono-sgen"
+MONO_OPTS="--optimize=all"
+MONO_ENV="MONO_THREADS_PER_CPU=250 MONO_GC_PARAMS=nursery-size=128m"
+UMASK="002"
diff --git a/debian/conf/jellyfin.conf b/debian/conf/jellyfin.conf
new file mode 100644
index 000000000..ef5c424e8
--- /dev/null
+++ b/debian/conf/jellyfin.conf
@@ -0,0 +1,24 @@
+# Override defaults for jellyfin initscript
+# sourced by /etc/init.d/jellyfin and /usr/bin/jellyfin
+# installed at /etc/jellyfin.conf by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+## To change the defaults add any of the following settings below the comments
+##
+## JELLYFIN_USER= #$JELLYFIN_USER, username to run Jellyfin under, the default is jellyfin
+## JELLYFIN_GROUP= #$JELLYFIN_GROUP, Jellyfin group where Jellyfin user belongs
+## JELLYFIN_DIR= #$JELLYFIN_DIR, the location of Jellyfin program files the default is /usr/lib/jellyfin
+## JELLYFIN_BIN= #$JELLYFIN_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/jellyfin/bin/MediaBrowser.Server.Mono.exe
+## JELLYFIN_DATA= #$JELLYFIN_DATA, the location of Jellyfin data, cache, logs, the default is /var/lib/jellyfin
+## JELLYFIN_PIDFILE= #$JELLYFIN_PIDFILE, the location of jellyfin.pid, the default is /var/run/jellyfin/jellyfin.pid
+## JELLYFIN_ADD_OPTS= #$JELLYFIN_ADD_OPTS, additional options to pass to the Jellyfin executable, beyond ffmpeg, ffprobe and restart
+## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
+## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
+## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
+##
+## EXAMPLE if want to run as different user
+## add JELLYFIN_USER=username
+## otherwise default jellyfin is used
diff --git a/debian/control b/debian/control
index f8f3ce451..7d1e5de38 100644
--- a/debian/control
+++ b/debian/control
@@ -1,4 +1,4 @@
-Source: emby-server
+Source: jellyfin
Section: misc
Priority: optional
Maintainer: Vasily <just.one.man@yandex.ru>
@@ -7,11 +7,11 @@ Build-Depends: debhelper (>= 9),
libc6-dev
Standards-Version: 3.9.4
-Package: emby-server
-Replaces: mediabrowser, emby, emby-server-beta, emby-server-dev
-Breaks: mediabrowser, emby, emby-server-beta, emby-server-dev
-Conflicts: mediabrowser, emby, emby-server-beta, emby-server-dev
+Package: jellyfin
+Replaces: mediabrowser, emby, emby-server-beta, jellyfin-dev, emby-server
+Breaks: mediabrowser, emby, emby-server-beta, jellyfin-dev, emby-server
+Conflicts: mediabrowser, emby, emby-server-beta, jellyfin-dev, emby-server
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, at, libsqlite3-0, dotnet-runtime-2.1
-Description: Emby Server is a home media server.
+Description: Jellyfin is a home media server.
It is built on top of other popular open source technologies such as Service Stack, jQuery, jQuery mobile, and Mono. It features a REST-based api with built-in documentation to facilitate client development. We also have client libraries for our api to enable rapid development.
diff --git a/debian/copyright b/debian/copyright
index 3862c698c..0d7a2a600 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,12 +1,13 @@
Format: http://dep.debian.net/deps/dep5
-Upstream-Name: emby
-Source: https://raw.githubusercontent.com/MediaBrowser/MediaBrowser/master/LICENSE.md
+Upstream-Name: jellyfin
+Source: https://github.com/jellyfin/jellyfin
Files: *
-Copyright: 2015 Luke Pulverenti <luke.pulverenti@gmail.com>
+Copyright: 2018 Jellyfin Team
License: GPL-2.0+
Files: debian/*
+Copyright: 2018 Joshua Boniface <joshua@boniface.me>
Copyright: 2014 Carlos Hernandez <carlos@techbyte.ca>
License: GPL-2.0+
diff --git a/debian/emby b/debian/emby
deleted file mode 100644
index d94249475..000000000
--- a/debian/emby
+++ /dev/null
@@ -1,37 +0,0 @@
-#Allow emby group to start, stop and restart itself
-Cmnd_Alias RESTARTSERVER_SYSV = /sbin/service emby-server restart, /usr/sbin/service emby-server restart
-Cmnd_Alias STARTSERVER_SYSV = /sbin/service emby-server start, /usr/sbin/service emby-server start
-Cmnd_Alias STOPSERVER_SYSV = /sbin/service emby-server stop, /usr/sbin/service emby-server stop
-Cmnd_Alias RESTARTSERVER_SYSTEMD = /usr/bin/systemctl restart emby-server, /bin/systemctl restart emby-server
-Cmnd_Alias STARTSERVER_SYSTEMD = /usr/bin/systemctl start emby-server, /bin/systemctl start emby-server
-Cmnd_Alias STOPSERVER_SYSTEMD = /usr/bin/systemctl stop emby-server, /bin/systemctl stop emby-server
-Cmnd_Alias RESTARTSERVER_INITD = /etc/init.d/emby-server restart
-Cmnd_Alias STARTSERVER_INITD = /etc/init.d/emby-server start
-Cmnd_Alias STOPSERVER_INITD = /etc/init.d/emby-server stop
-
-
-%emby ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSV
-%emby ALL=(ALL) NOPASSWD: STARTSERVER_SYSV
-%emby ALL=(ALL) NOPASSWD: STOPSERVER_SYSV
-%emby ALL=(ALL) NOPASSWD: RESTARTSERVER_SYSTEMD
-%emby ALL=(ALL) NOPASSWD: STARTSERVER_SYSTEMD
-%emby ALL=(ALL) NOPASSWD: STOPSERVER_SYSTEMD
-%emby ALL=(ALL) NOPASSWD: RESTARTSERVER_INITD
-%emby ALL=(ALL) NOPASSWD: STARTSERVER_INITD
-%emby ALL=(ALL) NOPASSWD: STOPSERVER_INITD
-
-Defaults!RESTARTSERVER_SYSV !requiretty
-Defaults!STARTSERVER_SYSV !requiretty
-Defaults!STOPSERVER_SYSV !requiretty
-Defaults!RESTARTSERVER_SYSTEMD !requiretty
-Defaults!STARTSERVER_SYSTEMD !requiretty
-Defaults!STOPSERVER_SYSTEMD !requiretty
-Defaults!RESTARTSERVER_INITD !requiretty
-Defaults!STARTSERVER_INITD !requiretty
-Defaults!STOPSERVER_INITD !requiretty
-
-#Allow the server to mount iso images
-%emby ALL=(ALL) NOPASSWD: /bin/mount
-%emby ALL=(ALL) NOPASSWD: /bin/umount
-
-Defaults:%emby !requiretty
diff --git a/debian/emby-server.conf b/debian/emby-server.conf
deleted file mode 100644
index 8bd6fc25a..000000000
--- a/debian/emby-server.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-# Override defaults for emby initscript
-# sourced by /etc/init.d/emby-server and /usr/bin/emby-server
-# installed at /etc/emby-server.conf by the maintainer scripts
-
-#
-# This is a POSIX shell fragment
-#
-
-## To change the defaults add any of the following settings below the comments
-##
-## EMBY_USER= #$EMBY_USER, username to run Emby under, the default is emby
-## EMBY_GROUP= #$EMBY_GROUP, Emby server group where Emby user belongs
-## EMBY_DIR= #$EMBY_DIR, the location of Emby program files the default is /usr/lib/emby-server
-## EMBY_BIN= #$EMBY_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe
-## EMBY_DATA= #$EMBY_DATA, the location of Emby data, cache, logs, the default is /var/lib/emby-server
-## EMBY_PIDFILE= #$EMBY_PIDFILE, the location of emby.pid, the default is /var/run/emby/emby-server.pid
-## EMBY_ADD_OPTS= #$EMBY_ADD_OPTS, additional options to pass to the Emby server executable, beyond ffmpeg, ffprobe and restart
-## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
-## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
-## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
-##
-## EXAMPLE if want to run as different user
-## add EMBY_USER=username
-## otherwise default emby is used
diff --git a/debian/emby-server.emby-server.default b/debian/emby-server.emby-server.default
deleted file mode 100644
index 33f5ebb5b..000000000
--- a/debian/emby-server.emby-server.default
+++ /dev/null
@@ -1,37 +0,0 @@
-# Defaults for emby initscript
-# sourced by /etc/init.d/emby-server and /usr/lib/emby-server/emby-server.sh
-# installed at /etc/default/emby-server by the maintainer scripts
-
-#
-# This is a POSIX shell fragment
-#
-
-## Don't edit this file
-## Edit user configuration in /etc/emby-server.conf to change
-##
-## EMBY_USER= #$EMBY_USER, username to run Emby under, the default is emby
-## EMBY_GROUP= #$EMBY_GROUP, Emby server group where Emby user belongs
-## EMBY_DIR= #$EMBY_DIR, the location of Emby program files the default is /usr/lib/emby-server
-## EMBY_BIN= #$EMBY_BIN, full path of MediaBrowser.Server.Mono.exe the default is /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe
-## EMBY_DATA= #$EMBY_DATA, the location of Emby data, cache, logs, the default is /var/lib/emby-server
-## EMBY_PIDFILE= #$EMBY_PIDFILE, the location of emby.pid, the default is /var/run/emby/emby-server.pid
-## EMBY_ADD_OPTS= #$EMBY_ADD_OPTS, additional options to pass to the Emby server executable, beyond ffmpeg, ffprobe and restart
-## MONO_BIN= #$MONO_BIN, full path of mono binary, the default is /usr/bin/mono-sgen
-## MONO_OPTS= #$MONO_OPTS, list of additional options to pass to mono binary
-## MONO_ENV= #$MONO_ENV, list of environment variables for running mono binary
-##
-## EXAMPLE if want to run as different user
-## add EMBY_USER=username to /etc/emby-server.conf
-## otherwise default emby is used
-
-EMBY_USER="emby"
-EMBY_GROUP="emby"
-EMBY_DIR="/usr/lib/emby-server"
-EMBY_BIN="/usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe"
-EMBY_DATA="/var/lib/emby-server"
-EMBY_PIDFILE="/var/run/emby-server.pid"
-EMBY_ADD_OPTS=""
-MONO_BIN="/usr/bin/mono-sgen"
-MONO_OPTS="--optimize=all"
-MONO_ENV="MONO_THREADS_PER_CPU=250 MONO_GC_PARAMS=nursery-size=128m"
-UMASK="002"
diff --git a/debian/emby-server.emby-server.init b/debian/emby-server.emby-server.init
deleted file mode 100644
index 81ce3376b..000000000
--- a/debian/emby-server.emby-server.init
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-### BEGIN INIT INFO
-# Provides: emby-server
-# Required-Start: $remote_fs $local_fs $network
-# Required-Stop: $remote_fs $local_fs $network
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: starts instance of Emby
-# Description: starts instance of Emby
-### END INIT INFO
-
-
-# chkconfig: 2345 20 80
-#The above indicates that the script should be started in levels 2, 3, 4, and 5, #that its start priority should be 20, and that its stop priority should be 80.
-# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
-
-NAME=emby-server
-CONF_FILE=/etc/${NAME}.conf
-DEFAULT_FILE=/etc/default/${NAME}
-
-# Source Emby server default configuration
-. $DEFAULT_FILE
-
-# Source Emby server user configuration overrides
-if [[ -f $CONF_FILE ]]; then
- . $CONF_FILE
-else
- echo "${CONF_FILE} not found using default settings.";
-fi
-
-# Path of emby binary
-EMBYSERVER=/usr/bin/emby-server
-PIDFILE=${EMBY_PIDFILE-/var/run/emby-server.pid}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $NAME daemon"
- if [[ -s $PIDFILE ]] && [[ -n "$(ps -p $(cat $PIDFILE) -o pid=)" ]]; then
- log_daemon_msg "apparently already running"
- log_end_msg 0
- exit 0
- fi
- exec $EMBYSERVER start &
- sleep 2
- if [[ -s $PIDFILE ]] && [[ -n "$(ps -p $(cat $PIDFILE) -o pid=)" ]]; then
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- stop)
- log_daemon_msg "Stopping $NAME daemon"
- if [[ ! -s $PIDFILE ]] || [[ -z "$(ps -p $(cat $PIDFILE) -o pid=)" ]]; then
- [[ -e $PIDFILE ]] && rm -rf $PIDFILE
- log_success_msg "apparently already stopped"
- log_end_msg 0
- exit 0
- fi
- PID=$(cat $PIDFILE)
- CPIDS=$(pgrep -P $PID)
- sleep 2 && kill -KILL $CPIDS
- kill -TERM $CPIDS > /dev/null 2>&1
- sleep 2
- if [[ -z "$(ps -p $PID -o pid=)" ]]; then
- rm -rf $PIDFILE
- log_end_msg 0
- else
- log_end_msg 1
- fi
- ;;
- status)
- status_of_proc -p $PIDFILE "$EMBYSERVER" "$NAME"
- exit $? # notreached due to set -e
- ;;
- restart|force-reload)
- $0 stop || exit $?
- $0 start || exit $?
- ;;
- *)
- echo "Usage: /etc/init.d/emby-server {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
diff --git a/debian/emby-server.emby-server.service b/debian/emby-server.emby-server.service
deleted file mode 100644
index e5dbacb52..000000000
--- a/debian/emby-server.emby-server.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Emby Media Server
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/emby-server start
-Restart=on-abort
-TimeoutSec=20
-ExecStopPost=/usr/bin/emby-server clear
-
-[Install]
-WantedBy=multi-user.target
diff --git a/debian/install b/debian/install
index 7051a2fcd..a45091a3c 100644
--- a/debian/install
+++ b/debian/install
@@ -1,5 +1,5 @@
-usr/lib/emby-server usr/lib/
-debian/emby-server.conf etc/
-debian/emby etc/sudoers.d/
-debian/bin/emby-server usr/bin/
-debian/restart.sh usr/lib/emby-server
+usr/lib/jellyfin usr/lib/
+debian/conf/jellyfin.conf etc/
+debian/conf/jellyfin etc/default/
+debian/bin/jellyfin-sudoers etc/sudoers.d/
+debian/bin/restart.sh usr/lib/jellyfin/
diff --git a/debian/jellyfin.init b/debian/jellyfin.init
new file mode 100644
index 000000000..4f23e13f0
--- /dev/null
+++ b/debian/jellyfin.init
@@ -0,0 +1,44 @@
+### BEGIN INIT INFO
+# Provides: Jellyfin Media Server
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Jellyfin Media Server
+# Description: Runs Jellyfin Server
+### END INIT INFO
+
+# Carry out specific functions when asked to by the system
+pid=`ps -fA|grep dotnet|grep JellyfinServer|awk '{print $2}'| tr -d '\n'`
+
+case "$1" in
+ start)
+ if [ "$pid" == "" ]; then
+ echo "Starting Jellyfin..."
+ nohup dotnet /usr/lib/jellyfin/bin/EmbyServer.dll >/dev/null 2>&1 &
+ else
+ echo "Jellyfin already running"
+ fi
+ ;;
+ stop)
+ if [ "$pid" != "" ]; then
+ echo "Stopping Jellyfin..."
+ kill $pid
+ sleep 2
+ else
+ echo "Jellyfin not running"
+ fi
+ ;;
+ status)
+ if [ "$pid" != "" ]; then
+ echo "Jellyfin running as $pid"
+ ps -f $pid
+ else
+ echo "Jellyfin is not running"
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop}"
+ exit 1
+ ;;
+esac
diff --git a/debian/jellyfin.service b/debian/jellyfin.service
new file mode 100644
index 000000000..751d19f89
--- /dev/null
+++ b/debian/jellyfin.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Jellyfin Media Server
+After=network.target
+
+[Service]
+User=jellyfin
+ExecStart=/usr/bin/dotnet /usr/lib/jellyfin/bin/EmbyServer.dll
+Restart=on-abort
+TimeoutSec=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/emby-server.emby-server.upstart b/debian/jellyfin.upstart
index 4f089260c..ea7831ac0 100644
--- a/debian/emby-server.emby-server.upstart
+++ b/debian/jellyfin.upstart
@@ -1,4 +1,4 @@
-description "emby-server daemon"
+description "jellyfin daemon"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
@@ -15,9 +15,6 @@ script
# Log file
logger -t "$0" "DEBUG: `set`"
- exec /usr/bin/emby-server start
-end script
-
-post-stop script
- exec /usr/bin/emby-server clear
+ exec /usr/bin/jellyfin start
+ exec /usr/bin/dotnet /usr/lib/jellyfin/bin/EmbyServer.dll
end script
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index 03a98d376..2cdcae417 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -6,8 +6,8 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: emby-server\n"
-"Report-Msgid-Bugs-To: emby-server@packages.debian.org\n"
+"Project-Id-Version: jellyfin-server\n"
+"Report-Msgid-Bugs-To: jellyfin-server@packages.debian.org\n"
"POT-Creation-Date: 2015-06-12 20:51-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@@ -20,38 +20,38 @@ msgstr ""
#. Type: note
#. Description
#: ../templates:1001
-msgid "Emby permission info:"
+msgid "Jellyfin permission info:"
msgstr ""
#. Type: note
#. Description
#: ../templates:1001
msgid ""
-"Emby by default runs under a user named \"emby\". Please ensure that the "
-"user emby has read and write access to any folders you wish to add to your "
-"library. Otherwise please run emby under a different user."
+"Jellyfin by default runs under a user named \"jellyfin\". Please ensure that the "
+"user jellyfin has read and write access to any folders you wish to add to your "
+"library. Otherwise please run jellyfin under a different user."
msgstr ""
#. Type: string
#. Description
#: ../templates:2001
-msgid "Username to run Emby as:"
+msgid "Username to run Jellyfin as:"
msgstr ""
#. Type: string
#. Description
#: ../templates:2001
-msgid "The user that emby will run as."
+msgid "The user that jellyfin will run as."
msgstr ""
#. Type: note
#. Description
#: ../templates:3001
-msgid "Emby still running"
+msgid "Jellyfin still running"
msgstr ""
#. Type: note
#. Description
#: ../templates:3001
-msgid "Emby is currently running. Please close it and try again."
+msgid "Jellyfin is currently running. Please close it and try again."
msgstr ""
diff --git a/debian/postinst b/debian/postinst
index f1469f1c1..122de087d 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -1,45 +1,46 @@
#!/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}
+# Data directory where Jellyfin database, cache and logs are stored
+PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME}
case "$1" in
configure)
- # create emby group if it does not exist
- if [[ -z "$(getent group emby)" ]]; then
- addgroup --quiet --system emby > /dev/null 2>&1
+ # create jellyfin group if it does not exist
+ if [[ -z "$(getent group jellyfin)" ]]; then
+ addgroup --quiet --system jellyfin > /dev/null 2>&1
fi
- # create emby user if it does not exist
- if [[ -z "$(getent passwd emby)" ]]; then
- adduser --system --ingroup emby --shell /bin/false emby --no-create-home --home ${PROGRAMDATA} \
- --gecos "Emby Server default user" > /dev/null 2>&1
+ # create jellyfin user if it does not exist
+ if [[ -z "$(getent passwd jellyfin)" ]]; then
+ adduser --system --ingroup jellyfin --shell /bin/false jellyfin --no-create-home --home ${PROGRAMDATA} \
+ --gecos "Jellyfin default user" > /dev/null 2>&1
fi
# ensure $PROGRAMDATA has appropriate permissions
if [[ ! -d $PROGRAMDATA ]]; then
mkdir $PROGRAMDATA
- chown -R emby:emby $PROGRAMDATA
+ chown -R jellyfin:jellyfin $PROGRAMDATA
fi
- # ensure emby-server binary has appropriate permissions
- chmod 755 /usr/bin/emby-server
+ # ensure jellyfin binary has appropriate permissions
+ chmod 755 /usr/bin/jellyfin
- /usr/bin/mono --aot=full -O=all $EMBY_BIN > /dev/null 2>&1 || true
+ chmod +x ${JELLYFIN_DIR}/restart.sh > /dev/null 2>&1 || true
- chmod +x ${EMBY_DIR}/restart.sh > /dev/null 2>&1 || true
+ # Link hardcoded /var/lib/emby to /var/lib/jellyfin (TEMPORARY)
+ ln -sf /var/lib/jellyfin /var/lib/emby
;;
abort-upgrade|abort-remove|abort-deconfigure)
@@ -54,16 +55,16 @@ esac
if [[ -x "/usr/bin/deb-systemd-helper" ]]; then
# Manual init script handling
- deb-systemd-helper unmask emby-server.service >/dev/null || true
+ deb-systemd-helper unmask jellyfin.service >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
- if deb-systemd-helper --quiet was-enabled emby-server.service; then
+ if deb-systemd-helper --quiet was-enabled jellyfin.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
- deb-systemd-helper enable emby-server.service >/dev/null || true
+ deb-systemd-helper enable jellyfin.service >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
- deb-systemd-helper update-state emby-server.service >/dev/null || true
+ deb-systemd-helper update-state jellyfin.service >/dev/null || true
fi
fi
@@ -72,10 +73,10 @@ fi
if [[ "$1" == "configure" ]] || [[ "$1" == "abort-upgrade" ]]; then
if [[ -d "/run/systemd/systemd" ]]; then
systemctl --system daemon-reload >/dev/null || true
- deb-systemd-invoke start emby-server >/dev/null || true
- elif [[ -x "/etc/init.d/emby-server" ]] || [[ -e "/etc/init/emby-server.conf" ]]; then
- update-rc.d emby-server defaults >/dev/null
- invoke-rc.d emby-server start || exit $?
+ deb-systemd-invoke start jellyfin >/dev/null || true
+ elif [[ -x "/etc/init.d/jellyfin" ]] || [[ -e "/etc/init/jellyfin.conf" ]]; then
+ update-rc.d jellyfin defaults >/dev/null
+ invoke-rc.d jellyfin start || exit $?
fi
fi
exit 0
diff --git a/debian/postrm b/debian/postrm
index 90823ec14..852841b16 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -1,22 +1,22 @@
#!/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}
+# Data directory where Jellyfin database, cache and logs are stored
+PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME}
# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
@@ -28,27 +28,27 @@ case "$1" in
purge)
echo PURGE | debconf-communicate $NAME > /dev/null 2>&1 || true
- if [[ -x "/etc/init.d/emby-server" ]] || [[ -e "/etc/init/emby-server.connf" ]]; then
- update-rc.d emby-server remove >/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 emby-server.service >/dev/null
- deb-systemd-helper unmask emby-server.service >/dev/null
+ deb-systemd-helper purge jellyfin.service >/dev/null
+ deb-systemd-helper unmask jellyfin.service >/dev/null
fi
- userdel emby > /dev/null 2>&1 || true
- delgroup --quiet emby > /dev/null 2>&1 || true
+ userdel jellyfin > /dev/null 2>&1 || true
+ delgroup --quiet jellyfin > /dev/null 2>&1 || true
if [[ -d $PROGRAMDATA ]]; then
rm -rf $PROGRAMDATA
fi
- [[ -f /usr/bin/emby-server ]] && rm /usr/bin/emby-server
- [[ -f /etc/sudoers.d/emby ]] && rm /etc/sudoers.d/emby
- [[ -d /var/lib/emby-server ]] && rm -rf /var/lib/emby-server
+ [[ -f /usr/bin/jellyfin ]] && rm /usr/bin/jellyfin
+ [[ -f /etc/sudoers.d/jellyfin-sudoers ]] && rm /etc/sudoers.d/jellyfin-sudoers
+ [[ -d /var/lib/jellyfin ]] && rm -rf /var/lib/jellyfin
;;
remove)
if [[ -x "/usr/bin/deb-systemd-helper" ]]; then
- deb-systemd-helper mask emby-server.service >/dev/null
+ deb-systemd-helper mask jellyfin.service >/dev/null
fi
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
diff --git a/debian/preinst b/debian/preinst
index 643127796..c53260bb0 100644
--- a/debian/preinst
+++ b/debian/preinst
@@ -1,22 +1,22 @@
#!/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}
+# Data directory where Jellyfin database, cache and logs are stored
+PROGRAMDATA=${JELLYFIN_DATA-/var/lib/$NAME}
# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
@@ -32,22 +32,22 @@ case "$1" in
elif [ -x "/etc/init.d/${NAME}" ] || [ -e "/etc/init/${NAME}.conf" ]; then
invoke-rc.d ${NAME} stop > /dev/null 2>&1 || true
fi
- # try and figure out if emby is running
- PIDFILE=$(find /var/run/ -maxdepth 1 -mindepth 1 -name "emby*.pid" -print -quit)
- [[ -n "$PIDFILE" ]] && [[ -s "$PIDFILE" ]] && EMBY_PID=$(cat ${PIDFILE})
+ # try and figure out if jellyfin is running
+ 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
- echo "Stopping Emby Server!"
- # 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
+ echo "Stopping Jellyfin!"
+ # 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
- echo "Could not successfully stop EmbyServer, please do so before uninstalling."
+ if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then
+ echo "Could not successfully stop JellyfinServer, please do so before uninstalling."
exit 1
else
[[ -f $PIDFILE ]] && rm $PIDFILE
diff --git a/debian/prerm b/debian/prerm
index 341df6cd0..3cdffed79 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}
+# Data directory where Jellyfin database, cache and logs are stored
+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
- echo "Could not successfully stop EmbyServer, please do so before uninstalling."
+ if [[ -n "$(ps -p $JELLYFIN_PID -o pid=)" ]]; then
+ echo "Could not successfully stop Jellyfin, 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)
diff --git a/debian/rules b/debian/rules
index 107394fbe..3d596ddde 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,9 +14,11 @@ override_dh_auto_test:
override_dh_clistrip:
override_dh_auto_build:
-# dotnet build --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln --output='$(CURDIR)/usr/lib/emby-server/bin'
- dotnet publish --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln --output='$(CURDIR)/usr/lib/emby-server/bin'
+ git submodule init
+ git submodule update
+ dotnet build --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln --output='$(CURDIR)/usr/lib/jellyfin/bin'
+ dotnet publish --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln --output='$(CURDIR)/usr/lib/jellyfin/bin'
override_dh_auto_clean:
- dotnet clean --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln
- rm -rf '$(CURDIR)/usr/lib/emby-server'
+ dotnet clean --configuration $(CONFIG) $(CURDIR)/MediaBrowser.sln || true
+ rm -rf '$(CURDIR)/usr/lib/jellyfin'
diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides
index 2f3412fe2..aeb332f13 100644
--- a/debian/source.lintian-overrides
+++ b/debian/source.lintian-overrides
@@ -1,3 +1,3 @@
# This is an override for the following lintian errors:
-emby-server source: license-problem-md5sum-non-free-file Emby.Drawing/ImageMagick/fonts/webdings.ttf*
-emby-server source: source-is-missing
+jellyfin source: license-problem-md5sum-non-free-file Emby.Drawing/ImageMagick/fonts/webdings.ttf*
+jellyfin source: source-is-missing