Closed Razdeep closed 6 years ago
Yes, it is a very good suggestion :smiley: We can do this through a node script itself or a shell script too.
Do you want to work on it @Razdeep I will assign you this issue.
Yes, I would love to. @MadhavBahlMD
Great, for now you can create a separate file inside JavaScript folder (https://github.com/MadhavBahlMD/Control-Yourself/tree/master/JavaScript) named backup.js or backup.sh (depending on whether you want to work with JS or Shell) and add your code in that file. Later I will merge blocker.js and backup.js so that it automatically backs up /etc/hosts whenever we run blocker.js
Also, if possible go for JavaScript implementation rather than shell, as it will be easier to merge clocker and backup then.
The contributors/users might forget to back up the /etc/hosts file. Why don't we provide a script which would copy the file to another safe location, and rename each backup concatenated with a timestamp?
Feature: Backup and restore for system config files, because safety is important.