diff --git a/conf.d/main b/conf.d/main index 9b15964..fa5dc48 100755 --- a/conf.d/main +++ b/conf.d/main @@ -110,3 +110,5 @@ systemctl enable emby-server.service mkdir -p /var/lib/emby-server/config/ mv /usr/local/src/emby-branding.xml /var/lib/emby-server/config/branding.xml +# add Emby to monit configuration +ln -s /etc/monit/monitrc.d/emby-server /etc/monit/conf.d/emby-server diff --git a/overlay/etc/monit/monitrc.d/emby-server b/overlay/etc/monit/monitrc.d/emby-server new file mode 100644 index 0000000..82b2d95 --- /dev/null +++ b/overlay/etc/monit/monitrc.d/emby-server @@ -0,0 +1,22 @@ + check process emby-server with pidfile /var/run/emby-server.pid + group emby-server + start program = "/etc/init.d/emby-server start" + stop program = "/etc/init.d/emby-server stop" + if failed port 8096 protocol http request "/" then restart + if 5 restarts with 5 cycles then timeout + depend emby_bin + depend emby_conf + depend emby_rc + + check file emby_bin with path /usr/bin/emby-server + group emby-server + include /etc/monit/templates/rootbin + + check file emby_conf with path /etc/emby-server.conf + group emby-server + include /etc/monit/templates/rootrc + + check file emby_rc with path /etc/init.d/emby-server + group emby-server + include /etc/monit/templates/rootbin +