EODCrafter 181 Posted February 12, 2019 Posted February 12, 2019 Is this the correct way to delay the start of Emby at Boot on Ubuntu? I have a program that Emby causes DLNA conflict with that needs to run first.... [Unit] Description=Emby Server is a personal media server with apps on just about every device. After=network.target [Service] EnvironmentFile=/etc/emby-server.conf WorkingDirectory=/opt/emby-server ExecStartPre=-/bin/sleep 20 ExecStart=/opt/emby-server/bin/emby-server RestartForceExitStatus=3 User=emby [Install] WantedBy=multi-user.target This is what I found by googling..... ExecStartPre=-/bin/sleep 20
Solution Luke 42078 Posted February 12, 2019 Solution Posted February 12, 2019 Yes, please try it and report your experience. Thanks. 1
redaktorn 23 Posted July 28, 2020 Posted July 28, 2020 (edited) I was also interested in delaying the start of emby in my Linux system. My reason was that emby-service started before network connection was ready. This caused the built in search for updates (aplication and plugin) to fail at startup + DLNA does not load. (Both can of course be fixed after starting emby - but I wanted it done at boot) My way of doing it was: Copy files: emby-server.service and emby-server@.service (Now correct name) From: /usr/lib/systemd/system/ To: /etc/systemd/system/ In both files edit section [Service] so it looks like this: [Service] EnvironmentFile=/etc/emby-server.conf WorkingDirectory=/opt/emby-server ExecStartPre=-/bin/sleep 30 ExecStart=/opt/emby-server/bin/emby-server RestartForceExitStatus=3 User=emby (Thanks to EODCrafter above for the red line. I just changed delay 20 to 30) The reason I prefer to copy the files before editing is that /etc/systemd/system/ has priority over /usr/lib/systemd/system/. Changes will be more permanent. This works just fine for me running Linux Mint Mate version 19.3 I have noted no problems at all. And I can enjoy that search for updates and DLNA works as they should already from boot. Edit: Fix a small error on filename. The second file to copy is emby-server@.service (not embyserver@.service as it said before) Edited May 16, 2021 by redaktorn Fixed an error - wrong filename 1
Pseudomax 3 Posted September 2, 2021 Posted September 2, 2021 On 28/07/2020 at 18:44, redaktorn said: I was also interested in delaying the start of emby in my Linux system. My reason was that emby-service started before network connection was ready. This caused the built in search for updates (aplication and plugin) to fail at startup + DLNA does not load. (Both can of course be fixed after starting emby - but I wanted it done at boot) My way of doing it was: Copy files: emby-server.service and emby-server@.service (Now correct name) From: /usr/lib/systemd/system/ To: /etc/systemd/system/ In both files edit section [Service] so it looks like this: [Service] EnvironmentFile=/etc/emby-server.conf WorkingDirectory=/opt/emby-server ExecStartPre=-/bin/sleep 30 ExecStart=/opt/emby-server/bin/emby-server RestartForceExitStatus=3 User=emby (Thanks to EODCrafter above for the red line. I just changed delay 20 to 30) The reason I prefer to copy the files before editing is that /etc/systemd/system/ has priority over /usr/lib/systemd/system/. Changes will be more permanent. This works just fine for me running Linux Mint Mate version 19.3 I have noted no problems at all. And I can enjoy that search for updates and DLNA works as they should already from boot. Edit: Fix a small error on filename. The second file to copy is emby-server@.service (not embyserver@.service as it said before) Hi, thanks for this... very useful!! Also just for absolute clarity: when you say 'copy files' from: /usr/lib/systemd/system/ to: /etc/systemd/system/ I have assumed you obviously mean 'move files' ...
redaktorn 23 Posted September 2, 2021 Posted September 2, 2021 4 minutes ago, Pseudomax said: Hi, thanks for this... very useful!! Also just for absolute clarity: when you say 'copy files' from: /usr/lib/systemd/system/ to: /etc/systemd/system/ I have assumed you obviously mean 'move files' ... Copy or move, it does not matter. /etc/systemd/system takes priority.
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