added plex_permission service
This commit is contained in:
parent
ec00ec53a2
commit
166647ce92
7
systems/jeeves/scripts/plex_permission.sh
Normal file
7
systems/jeeves/scripts/plex_permission.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
plex_dir="/zfs/storage/plex/"
|
||||||
|
|
||||||
|
chown docker-service:users -R "$plex_dir"
|
||||||
|
find "$plex_dir" -type f -exec chmod 664 {} \;
|
||||||
|
find "$plex_dir" -type d -exec chmod 775 {} \;
|
20
systems/jeeves/services.nix
Normal file
20
systems/jeeves/services.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
systemd = {
|
||||||
|
services."plex_permission" = {
|
||||||
|
description = "maintains /zfs/storage/plex permissions";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.bash}/bin/bash /root/nix-dotfiles/systems/jeeves/scripts/plex_permission.sh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers."plex_permission" = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1h";
|
||||||
|
OnCalendar = "daily 03:00";
|
||||||
|
Unit = "plex_permission.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user