diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2017-04-16 13:09:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-16 13:09:26 +0100 |
commit | 2db0cf08971bf675d858574f5e69343f0bb025d4 (patch) | |
tree | aeda4f789181651071f82dbaafb87eb04be32baa /nixos | |
parent | 7928dbdcf9c747efd919f3d8da055134a12f0493 (diff) | |
parent | 5a50b266624bceee5243c6eadf86d958768bfa6c (diff) |
Merge pull request #24900 from pjones/pjones/plex-service
plex: Don't overwrite primary database on restart
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/plex.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/plex.nix b/nixos/modules/services/misc/plex.nix index f6bf2dee9865..9c0bea8d3bff 100644 --- a/nixos/modules/services/misc/plex.nix +++ b/nixos/modules/services/misc/plex.nix @@ -93,7 +93,9 @@ in # why this is done. test -d "${cfg.dataDir}/.skeleton" || mkdir "${cfg.dataDir}/.skeleton" for db in "com.plexapp.plugins.library.db"; do - cp "${cfg.package}/usr/lib/plexmediaserver/Resources/base_$db" "${cfg.dataDir}/.skeleton/$db" + if [ ! -e "${cfg.dataDir}/.skeleton/$db" ]; then + cp "${cfg.package}/usr/lib/plexmediaserver/Resources/base_$db" "${cfg.dataDir}/.skeleton/$db" + fi chmod u+w "${cfg.dataDir}/.skeleton/$db" chown ${cfg.user}:${cfg.group} "${cfg.dataDir}/.skeleton/$db" done @@ -136,6 +138,7 @@ in Group = cfg.group; PermissionsStartOnly = "true"; ExecStart = "/bin/sh -c ${cfg.package}/usr/lib/plexmediaserver/Plex\\ Media\\ Server"; + KillSignal = "SIGQUIT"; Restart = "on-failure"; }; environment = { |