Re-enable cron and inline perm script
This commit is contained in:
parent
87b5fd2b51
commit
5d9e3164e4
|
@ -55,13 +55,20 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#services.cron = {
|
services.cron = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# systemCronJobs = [
|
systemCronJobs =
|
||||||
# "0 20 * * 1 root /root/reassert-nas-permissions.sh"
|
let
|
||||||
# "0 0 * * 1 tvb . /etc/profile; /home/tvb/gitea-backup"
|
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 = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in New Issue