Use ctime, not atime to find old files
This commit is contained in:
+50
-48
@@ -82,54 +82,56 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.objectifier = {
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
OBJECTIFIER_YOLOV3_CONFIG = "${pkgs.yolov3-data}/yolov3.cfg";
|
||||
OBJECTIFIER_YOLOV3_WEIGHTS = "${pkgs.yolov3-data}/yolov3.weights";
|
||||
OBJECTIFIER_YOLOV3_LABELS = "${pkgs.yolov3-data}/labels";
|
||||
OBJECTIFIER_BUFFER_SIZE = "524288";
|
||||
OBJECTIFIER_CLEANUP_MAX_AGE = toString cfg.cleanup.max_file_age;
|
||||
OBJECTIFIER_CLEANUP_DELAY = toString cfg.cleanup.delay;
|
||||
OBJECTIFIER_TIMEOUT = toString cfg.detection-timeout;
|
||||
OBJECTIFIER_POOL_SIZE = toString cfg.pool-size;
|
||||
};
|
||||
serviceConfig = {
|
||||
PrivateUsers = true;
|
||||
PrivateDevices = true;
|
||||
PrivateTmp = true;
|
||||
PrivateMounts = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectSystem = true;
|
||||
ProtectHostname = true;
|
||||
ProtectHome = true;
|
||||
ProtectClock = true;
|
||||
ProtectKernelLogs = true;
|
||||
# DynamicUser = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
RestrictRealtime = true;
|
||||
LockPersonality = true;
|
||||
PermissionsStartOnly = true;
|
||||
WorkingDirectory = "${pkgs.objectifier}";
|
||||
StateDirectory = "objectifier";
|
||||
CacheDirectory = "objectifier";
|
||||
RuntimeDirectory = "objectifier";
|
||||
LimitNOFILE = 4096;
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
Type = "simple";
|
||||
ExecStart = let
|
||||
bindClause = concatStringsSep " "
|
||||
(map (addr: "--bind ${addr}:${toString cfg.port}")
|
||||
cfg.listen-addresses);
|
||||
in (concatStringsSep " " [
|
||||
"${pkgs.objectifier}/bin/objectifier"
|
||||
bindClause
|
||||
"--workers ${toString cfg.workers}"
|
||||
]);
|
||||
systemd.services = {
|
||||
objectifier = {
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
OBJECTIFIER_YOLOV3_CONFIG = "${pkgs.yolov3-data}/yolov3.cfg";
|
||||
OBJECTIFIER_YOLOV3_WEIGHTS = "${pkgs.yolov3-data}/yolov3.weights";
|
||||
OBJECTIFIER_YOLOV3_LABELS = "${pkgs.yolov3-data}/labels";
|
||||
OBJECTIFIER_BUFFER_SIZE = "524288";
|
||||
OBJECTIFIER_CLEANUP_MAX_AGE = toString cfg.cleanup.max_file_age;
|
||||
OBJECTIFIER_CLEANUP_DELAY = toString cfg.cleanup.delay;
|
||||
OBJECTIFIER_TIMEOUT = toString cfg.detection-timeout;
|
||||
OBJECTIFIER_POOL_SIZE = toString cfg.pool-size;
|
||||
};
|
||||
serviceConfig = {
|
||||
PrivateUsers = true;
|
||||
PrivateDevices = true;
|
||||
PrivateTmp = true;
|
||||
PrivateMounts = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectSystem = true;
|
||||
ProtectHostname = true;
|
||||
ProtectHome = true;
|
||||
ProtectClock = true;
|
||||
ProtectKernelLogs = true;
|
||||
# DynamicUser = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
RestrictRealtime = true;
|
||||
LockPersonality = true;
|
||||
PermissionsStartOnly = true;
|
||||
WorkingDirectory = "${pkgs.objectifier}";
|
||||
StateDirectory = "objectifier";
|
||||
CacheDirectory = "objectifier";
|
||||
RuntimeDirectory = "objectifier";
|
||||
LimitNOFILE = 4096;
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
Type = "simple";
|
||||
ExecStart = let
|
||||
bindClause = concatStringsSep " "
|
||||
(map (addr: "--bind ${addr}:${toString cfg.port}")
|
||||
cfg.listen-addresses);
|
||||
in (concatStringsSep " " [
|
||||
"${pkgs.objectifier}/bin/objectifier"
|
||||
bindClause
|
||||
"--workers ${toString cfg.workers}"
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user