Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Allow to prevent rule removal for a specified time range #1414

@imkaihao

Description

@imkaihao

I use Santa in monitor mode to block distracting apps locally (without a sync server). However, it's easy to bypass the block by simply removing the rule.

Adding an option to lock rules for a specific duration would significantly improve self-control.

For example, at time t1, if we run:

sudo santactl rule --block --path /Applications/Example.app --duration Δt1

The rule cannot be removed until t2 (t2 = t1 + Δt1).

If, at time t3, we run again:

sudo santactl rule --block --path /Applications/Example.app --duration Δt2

If t4 (t4 = t3 + Δt2) is later than t2, the rule's expiration time updates to t4, preventing removal until then. Otherwise, the expiration time remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions