Jump to content

Delay emby startup on reboot


Recommended Posts

Posted

Hi guys,

 

I'd like to delay the startup of the emby service on boot to allow time for my fuse points to mount. Nothing major, two minutes would be perfect, as emby starts so quickly there's the chance my users could choose media that is not yet available- I'd rather them just not be able to access emby until these mounts are ready.

I'm running Ubuntu 14.04, any ideas?

 

Thanks 

Posted

One way to do it:

 

1- Disable Emby service to start on boot.

 

2- Create a simple bash script that will wait for X amount of time and then start Emby service.

 

3- Add the script to the rc.local file so it will be executed on boot. I would also send the script to the background while calling it from rc.local so you don't delay the execution of the rest of the rc.local script (in case it's doing something else).

 

I'm sure there are many other better ways but this onr is simplr and it should work fine.

 

Cheers

 

 

Sent from my iPhone using Tapatalk

Posted

On systems based on systemd the "by the book" approach would be to add conditions to the emby-server startup files for the mounts etc. That way the systemd would start emby after the necessary/required services are already up and running.

 

Unfortunately I'm not fluent enough with systemd to provide the correct syntax/files out of my head...

 

BR,

Andy777

zombieagain
Posted

This is what I added in the systemd emby service file (under the [unit] section):

RequiresMountsFor= list of space separated mount point that you need before starting emby

I did it just a couple of days back, so too early to say that it works perfectly, but according to my google readings, it should be the right way to do it.

Posted

Ubuntu 14.04 doesn't use systemd oob.

 

 

Sent from my iPad using Tapatalk

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...