Good morning! I show you a .service that randomly stops sometimes but it won't restart. I would like to see what it would be possible to do to make it restart automatically and quickly!
Code:
[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
ExecStart=/opt/emby-server/bin/emby-server
RestartForceExitStatus=3
User=emby
[Install]
WantedBy=multi-user.target
As it does not stop frequently, I would like to know if this way the problem would be solved!
Code:
[Unit]
Description=Emby Server is a personal media server with apps on just about ever>
After=network.target
[Service]
EnvironmentFile=/etc/emby-server.conf
WorkingDirectory=/opt/emby-server
ExecStart=/opt/emby-server/bin/emby-server
User=emby
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
Thank you!