1
1
Fork 0

Re-enable cron and inline perm script

This commit is contained in:
Jaculabilis 2022-11-27 00:04:40 +00:00
parent 87b5fd2b51
commit 5d9e3164e4
1 changed files with 14 additions and 7 deletions

View File

@ -55,13 +55,20 @@
};
};
#services.cron = {
# enable = true;
# systemCronJobs = [
# "0 20 * * 1 root /root/reassert-nas-permissions.sh"
# "0 0 * * 1 tvb . /etc/profile; /home/tvb/gitea-backup"
# ];
#};
services.cron = {
enable = true;
systemCronJobs =
let
reassertPerms = pkgs.writeShellScript "reassert-nas-permissions.sh" ''
${pkgs.coreutils}/bin/chown -v -R tvb:nas /nas
${pkgs.findutils}/bin/find /nas -type d -exec ${pkgs.coreutils}/bin/chmod -v 750 {} \;
${pkgs.findutils}/bin/find /nas -type f -exec ${pkgs.coreutils}/bin/chmod -v 640 {} \;
'';
in [
"0 20 * * 1 root ${reassertPerms}"
"0 0 * * 1 tvb . /etc/profile; /home/tvb/gitea-backup"
];
};
services.openssh = {
enable = true;