:: Re: [DNG] How to run Emby server on…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mario Marietto
Date:  
À: dng@d404.nl
CC: dng
Sujet: Re: [DNG] How to run Emby server on Devuan 5.
root@devuan-bunsen:/opt/emby-server/bin# gedit emby-server

#!/bin/sh

APP_DIR=/opt/emby-server

export AMDGPU_IDS=$APP_DIR/extra/share/libdrm/amdgpu.ids
if [ -z "$EMBY_DATA" ]; then
export EMBY_DATA=/var/lib/emby
fi
export FONTCONFIG_PATH=$APP_DIR/etc/fonts
export LD_LIBRARY_PATH=$APP_DIR/lib:$APP_DIR/extra/lib
export LIBVA_DRIVERS_PATH=$APP_DIR/extra/lib/dri
export OCL_ICD_VENDORS=$APP_DIR/extra/etc/OpenCL/vendors
export PCI_IDS_PATH=$APP_DIR/share/hwdata/pci.ids
export SSL_CERT_FILE=$APP_DIR/etc/ssl/certs/ca-certificates.crt
export XDG_CACHE_HOME=$EMBY_DATA/cache

exec $APP_DIR/system/EmbyServer \
-programdata $EMBY_DATA \
-ffdetect $APP_DIR/bin/ffdetect \
-ffmpeg $APP_DIR/bin/ffmpeg \
-ffprobe $APP_DIR/bin/ffprobe \
-restartexitcode 3 \
-updatepackage 'emby-server-deb_{version}_armhf.deb'

On Fri, Feb 16, 2024 at 10:15 PM Mario Marietto <marietto2008@???>
wrote:

> root@devuan-bunsen:/etc/init.d# service emby-server start
>
> Starting emby-server daemon:start-stop-daemon: unable to stat
> /opt/emby-server/bin/embyserver (No such file or directory)
> failed!
>
> On Fri, Feb 16, 2024 at 10:11 PM dng@??? <dng@???> wrote:
>
>> On 16-02-2024 21:58, Mario Marietto wrote:
>>
>> ---> And I cleaned the init script a bit for which I warned you had to do.
>> I'm inexperienced,thanks for the understanding.
>>
>> root@devuan-bunsen:/etc/init.d# /etc/init.d/emby-server start
>> Starting emby-server daemon:start-stop-daemon: missing group name
>> failed!
>>
>> On Fri, Feb 16, 2024 at 9:47 PM dng@??? <dng@???> wrote:
>>
>>> On 16-02-2024 21:00, Mario Marietto wrote:
>>>
>>> root@devuan-bunsen:/etc/init.d# chmod ugo+x /etc/init.d/emby-server
>>>
>>> root@devuan-bunsen:/etc/init.d# ls
>>>
>>> README                  elogind                mountkernfs.sh
>>>               sddm
>>> alsa-utils              *emby-server*

>>>
>>> root@devuan-bunsen:~# service emby-server start
>>> env: '/etc/init.d/emby-server': No such file or directory
>>>
>>> The missing file is probably /etc/default/emby-server which you can copy
>>> from /etc/emby-server.conf. Files in /etc/default do not have a extension
>>> so:
>>>
>>> sudo cp /etc/emby-server.conf /etc/default/emby-server
>>>
>>> And I cleaned the init script a bit for which I warned you had to do.
>>>
>>> #!/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
>>> EMBY_DATA=/var/lib/emby
>>> CONF_FILE=/etc/${NAME}.conf
>>> DEFAULT_FILE=/etc/default/${NAME}
>>>
>>> APP_DIR=/opt/emby-server
>>> export FONTCONFIG_PATH=$APP_DIR/etc/fonts
>>>
>>> export LD_LIBRARY_PATH=$APP_DIR/lib:$APP_DIR/lib/samba
>>> export LIBVA_DRIVERS_PATH=$APP_DIR/lib/dri
>>> export SSL_CERT_FILE=$APP_DIR/etc/ssl/certs/ca-certificates.crt
>>>
>>> # 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
>>> DAEMON=${APP_DIR}/bin/embyserver
>>> ARGS="-programdata $EMBY_DATA \
>>> -ffmpeg $APP_DIR/bin/ffmpeg \
>>> -ffprobe $APP_DIR/bin/ffprobe \
>>> -restartexitcode 3 \
>>> -updatepackage 'emby-server-deb_{version}_armhf.deb'"
>>> PIDFILE=/var/run/emby-server.pid
>>>
>>> case "$1" in
>>>   start)
>>>     log_daemon_msg "Starting $NAME daemon"
>>>     start-stop-daemon --start --quiet --background --chuid
>>> ${EMBY_USER}:${EMBY_GROUP} \
>>>         --make-pidfile --pidfile $PIDFILE \
>>>         --exec $DAEMON -- $ARGS
>>>     log_end_msg $?
>>>     ;;
>>>   stop)
>>>     log_daemon_msg "Stopping $NAME daemon"
>>>     start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
>>>         --remove-pidfile --pidfile $PIDFILE \
>>>         --exec $DAEMON -- $ARGS
>>>     log_end_msg $?
>>>     ;;
>>>   status)
>>>     status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
>>>     ;;
>>>   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

>>>
>>>
>>
>>
>> --
>> Mario.
>>
>> Add to the script
>>
>> EMBY_USER=emby
>> EMBY_GROUP=emby
>>
>> (between NAME=emby-server EMBY_DATA=/var/lib/emby)
>>
>> Grtz.
>>
>> Nick
>>
>
>
> --
> Mario.
>



--
Mario.