final adjustments to the slop
This commit is contained in:
@@ -28,6 +28,7 @@ in
|
||||
};
|
||||
holocron = {
|
||||
copyparty.enable = true;
|
||||
ensure_perms.enable = true;
|
||||
zfs.enable = true;
|
||||
smb.enable = true;
|
||||
nfs.enable = true;
|
||||
|
||||
@@ -22,7 +22,10 @@ in {
|
||||
# and to clean up the ownership from the arr stack in /holocron/media
|
||||
systemd.services.${service} = {
|
||||
description = "ensure file permissions for archives, media and user folders";
|
||||
serviceConfig.ExecStart = ''
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
#!/bin/bash
|
||||
|
||||
# Fix ownership for archives directory
|
||||
@@ -42,15 +45,16 @@ in {
|
||||
fi
|
||||
done
|
||||
'';
|
||||
wantedBy = ["multi-user.target"];
|
||||
type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
# timer to run the service periodically (e.g., daily)
|
||||
systemd.timers.${service} = {
|
||||
description = "run script to ensure_perms daily";
|
||||
timerConfig.OnCalendar = "daily"; # Can be adjusted to hourly, weekly, etc.
|
||||
unit = "${service}.service";
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user