Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Add checks to prevent concurrent executions of local-cname. #3

Merged
merged 1 commit into from
Oct 3, 2020

Conversation

Neki
Copy link
Contributor

@Neki Neki commented Jun 20, 2019

This PR adds a file lock to prevent concurrent executions of local-cname (this is an easy mistake to make when one has a lot of active terminals 😄 ) and will also check that the hosts file has not been modified by another instance before adding its entries.

@Ashark
Copy link

Ashark commented Apr 13, 2020

I think it is better to do this with systemd user service.
There is a fork here: https://github.com/evlon/local-cname which allows you to specify aliases in config file, which I like more. It remakes a resolving in a specified interval and dynamically updates your /etc/hosts.
With systemd service you could easily check the status of daemon, stop or start it as needed. And you do not need to keep a terminal window opened with running process.

@hjacobs hjacobs merged commit f251ed6 into hjacobs:master Oct 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants