Jorpd 0 Posted November 25, 2016 Posted November 25, 2016 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
fc7 123 Posted November 27, 2016 Posted November 27, 2016 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
Andy777 21 Posted November 28, 2016 Posted November 28, 2016 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
mastrmind11 722 Posted November 28, 2016 Posted November 28, 2016 You can start here: http://unix.stackexchange.com/questions/246935/set-systemd-service-to-execute-after-fstab-mount
zombieagain 7 Posted November 28, 2016 Posted November 28, 2016 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.
fc7 123 Posted November 28, 2016 Posted November 28, 2016 Ubuntu 14.04 doesn't use systemd oob. Sent from my iPad using Tapatalk
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now