An open API service indexing awesome lists of open source software.

https://github.com/agentcooper/hosts-cop

Restore /etc/hosts each time you remove sites from it (macOS)
https://github.com/agentcooper/hosts-cop

etc-hosts hosts-file macos productivity self-control

Last synced: 24 days ago
JSON representation

Restore /etc/hosts each time you remove sites from it (macOS)

Awesome Lists containing this project

README

          

# Hosts cop

`/etc/hosts` file is pretty useful for blocking websites ([guide]()). Once you learn how to do it, it is also easy to unblock them.

Hosts cop will restore `/etc/hosts` file to the previous version each time you try to remove blocked sites from it.

![notification](./screenshots/notification.png?raw=true)

Adding sites to `/etc/hosts` will not trigger a notification.

For macOS.

## Install

```bash
git clone https://github.com/agentcooper/hosts-cop
sudo ./hosts-cop/start
```

## Stop

```bash
# from hosts-cop directory
sudo ./stop
```

## Why `sudo`?

Script needs to run from [`/Library/LaunchDaemons/`](https://www.launchd.info/) to be able to write to `/etc/hosts`.