Jump to content

update-rc.d: error: cannot find a LSB script for emby-server


ziomario

Recommended Posts

Hello.
 
I've just installed emby server on Devuan 5 on my ARM (v7) chromebook at 32 bit like this :
 
 
# dpkg -i emby-server-deb_4.7.14.0_armhf.deb

Selecting previously unselected package emby-server.
(Reading database ... 218751 files and directories currently installed.)
Preparing to unpack emby-server-deb_4.7.14.0_armhf.deb ...
Unpacking emby-server (4.7.14.0) ...
Setting up emby-server (4.7.14.0) ...
daemon-reload is a NOP.
update-rc.d emby-server enable
update-rc.d: error: cannot find a LSB script for emby-server
service emby-server start
emby-server: unrecognized service
 
 
How can I fix the error ? thanks.

 

Link to comment
Share on other sites

Hi, this is because we don't support sysv, only upstart and systemd at the moment. Devuan is one of the few operating systems that is using sysv.

Link to comment
Share on other sites

Did you try it? We haven't tested on Devuan before. I think you'll just have to give it a shot and let us know how it goes. Thanks !

Link to comment
Share on other sites

Wrote an init.d script according to the the dependency-booting specification (see at https://wiki.debian.org/LSBInitScripts). , called emby.sh. Placed the script under /etc/init.d.
ln -s /root/scripts/emby.sh /etc/init.d/emby 

Updated the runlevel directories under /etc/rc*:

update-rc.d emby defaults
 
 
 
#! /bin/bash
 
### BEGIN INIT INFO
# Provides: emby
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: emby service
# Description: Run emby service
### END INIT INFO
 
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting emby-server..."
sudo -u emby-user bash -c 'cd /opt/emby-server/bin/ && ./start-emby.sh'
;;
stop)
echo "Stopping emby-server..."
sudo -u emby-user bash -c 'cd /opt/emby-server/bin/ && ./stop-emby.sh'
sleep 2
;;
*)
echo "Usage: /etc/init.d/emby {start|stop}"
exit 1
;;
esac
 

exit 0

 

start-emby.sh :

/opt/emby-server/bin/./emby-server &

 

stop-emby.sh

I don't know...

 

I don't know what "emby-user" is.

 

Edited by ziomario
Link to comment
Share on other sites

10 hours ago, ziomario said:
Wrote an init.d script according to the the dependency-booting specification (see at https://wiki.debian.org/LSBInitScripts). , called emby.sh. Placed the script under /etc/init.d.
ln -s /root/scripts/emby.sh /etc/init.d/emby 

Updated the runlevel directories under /etc/rc*:

update-rc.d emby defaults
 
 
 
#! /bin/bash
 
### BEGIN INIT INFO
# Provides: emby
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: emby service
# Description: Run emby service
### END INIT INFO
 
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting emby-server..."
sudo -u emby-user bash -c 'cd /opt/emby-server/bin/ && ./start-emby.sh'
;;
stop)
echo "Stopping emby-server..."
sudo -u emby-user bash -c 'cd /opt/emby-server/bin/ && ./stop-emby.sh'
sleep 2
;;
*)
echo "Usage: /etc/init.d/emby {start|stop}"
exit 1
;;
esac
 

exit 0

 

start-emby.sh :

/opt/emby-server/bin/./emby-server &

 

stop-emby.sh

I don't know...

 

I don't know what "emby-user" is.

 

Do you have a question?

Link to comment
Share on other sites

yes,I was waiting for the replies to the questions that I haven't asked but I'd wrote that I didn't know what to do :

 

1) stop-emby.sh : I don't know what could be the content to add here to stop the server

2) I don't know what "emby-user" is.

Edited by ziomario
Link to comment
Share on other sites

3 minutes ago, ziomario said:

yes,I was waiting for the replies to the questions that I haven't asked but I have expressed that I didn't know what to do :

 

 

2) I don't know what "emby-user" is.

The server install package creates a user called emby on the machine. Does this answer that question?

Link to comment
Share on other sites

On 9/21/2023 at 3:20 PM, ziomario said:

Yes. thanks. Do you have an answer also to the first one question ? how to kill the emby server with a shell script.

for your OS i'm not sure. Just make sure to use a command that will send a graceful shutdown signal. You don't want to force kill it abruptly as that can result in database corruption. You could always script it to use the server api to shutdown.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...