mjpg-streamer service: restart on failure

This commit is contained in:
Nikolay Amiantov 2016-09-02 11:36:13 +03:00
parent 47bb8abd08
commit 608ee1c7b3

View file

@ -59,8 +59,12 @@ in {
description = "mjpg-streamer webcam streamer";
wantedBy = [ "multi-user.target" ];
serviceConfig.User = cfg.user;
serviceConfig.Group = cfg.group;
serviceConfig = {
User = cfg.user;
Group = cfg.group;
Restart = "on-failure";
RestartSec = 1;
};
script = ''
IPLUGIN="${cfg.inputPlugin}"