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
1 changed files with 6 additions and 2 deletions

View File

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