Re-enable cron and inline perm script
This commit is contained in:
parent
87b5fd2b51
commit
5d9e3164e4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue