buildhosts/buildhosts.1
2014-08-17 23:18:44 -04:00

96 lines
3.4 KiB
Groff

.if !\n(.g \{\
. if !\w|\*(lq| \{\
. ds lq ``
. if \w'\(lq' .ds lq "\(lq
. \}
. if !\w|\*(rq| \{\
. ds rq ''
. if \w'\(rq' .ds rq "\(rq
. \}
.\}
.ie t .ds Tx \s-1T\v'.4n'\h'-.1667'E\v'-.4n'\h'-.125'X\s0
. el .ds Tx TeX
.de Id
. ds Yr \\$4
. substring Yr 0 3
. ds Mn \\$4
. substring Mn 5 6
. ds Dy \\$4
. substring Dy 8 9
. \" ISO 8601 date, complete format, extended representation
. ds Dt \\*(Yr-\\*(Mn-\\*(Dy
..
.TH BUILDHOSTS 1 \*(Dt "buildhosts (git)" "User Commands"
.hy 0
.
.SH "NAME"
.B buildhosts
\- build and maintain \fB/etc/hosts\fR while including lists imported from local and remote hosts list sources\.
.
.SH "SYNOPSIS"
.
.B buildhosts
.RI [COMMAND]
.
.SH "COMMANDS"
.
.TP
\fBbuild\fR: generate \fB/etc/hosts\fR using \fB/etc/hosts\.core\fR and the configured sources
.TP
.TP
\fBrevert\fR: remove lists imported from hosts list sources and restore \fB/etc/hosts\fR
.TP
.TP
\fBhelp\fR: display the help
.
.SH "INSTRUCTIONS"
\fBNote:\fR All instructions should be performed as the \fBroot\fR user or using the \fBsudo\fR command\.
.
.SS "Enable Remote Sources"
.TP
.IP "1."
The first time you run the \fBbuild\fR command, \fB/etc/hosts\fR will be moved to \fB/etc/hosts\.core\fR, and the file \fB/etc/hosts\.sources\fR will be created using the default sources list\. The \fB/etc/hosts\fR file will then be generated by combining \fB/etc/hosts\.core\fR and the resulting contents of the downloaded sources in \fB/etc/hosts\.sources\fR\.
.TP
.TP
.BR "2."
You can now open \fB/etc/hosts\.sources\fR and remove or comment out (by adding \fB#\fR in front) any sources you don\'t wish to use, as well as add new ones\. Sources can remote (ie: \fBhttp://adaway\.org/hosts\.txt\fR) as well as local (ie: \fBfile:///etc/hosts\.d/mylist\.txt\fR)\.
.TP
.TP
.BR "3."
If you want to make any changes to the contents of what used to be \fB/etc/hosts\fR, you should now make them to \fB/etc/hosts\.core\fR, and you\'ll need to rerun the \fBbuild\fR command to have them applied\.
.TP
.TP
.BR "4."
Once you\'re done customizing your configuration, run the \fBbuild\fR command again and the \fB/etc/hosts\fR file will be regenerated using the current list of sources and your up\-to\-date \fB/etc/hosts\.core\fR file\.
.SS "Disable Remote Sources"
.TP
.BR "1."
To disable the configured hosts lists, run the \fBrevert\fR command and \fB/etc/hosts\.core\fR will be moved back to \fB/etc/hosts\fR\.
.TP
.TP
.BR "*"
The \fB/etc/hosts\.sources\fR file will continue to exist until it\'s manually deleted, and it will be used again the next time remote sources are enabled\.
.SS "Notes on /etc/hosts\.sources"
.TP
On each line of \fB/etc/hosts\.sources\fR, after \fB#\fR is commented/skipped\.
.TP
.TP
Colour output can be disabled by setting the variable \fBNOCOL=1\fR\.
.TP
.TP
The \fB$HOSTS_SYSTEM\fR variable can be set to an alternative location to configure a different file to be used for \fB/etc/hosts\fR\.
.TP
.TP
Similarly, the \fB$HOSTS_CORE\fR and \fB$HOSTS_SOURCES\fR variables (which default to \fB$HOSTS_SYSTEM\.core\fR and \fB$HOSTS_SYSTEM\.sources\fR and will automatically change when \fB$HOSTS_SYSTEM\fR is changed), can be set to alternative locations to configure the use of different files\.
.
.SH "CREDITS"
Written by Kevin MacMartin:
.
.IP "\(bu" 4
GitHub Projects \fIhttps://github\.com/prurigro\fR
.
.IP "\(bu" 4
Arch Linux AUR Packages \fIhttps://aur\.archlinux\.org/packages/?SeB=m&K=prurigro\fR
.
.SH "LICENSE"
Released under the MIT license \fIhttp://opensource\.org/licenses/MIT\fR\.