buildhosts/buildhosts.1

87 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
.TP
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"
.
.P
\fBbuild\fR: generate \fB/etc/hosts\fR using \fB/etc/hosts\.core\fR and the configured sources
.P
.P
\fBrevert\fR: remove lists imported from hosts list sources and restore \fB/etc/hosts\fR
.P
.P
\fBhelp\fR: display the help
.P
.P
\fB**\fR Colour output can be disabled by setting the variable \fBNOCOL=1\fR
.
.SH "INSTRUCTIONS"
(All instructions should be performed as the \fBroot\fR user or using the \fBsudo\fR command)
.
.SS "Enable Remote Sources"
.P
\fB1\.\fR 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\.
.P
\fB2\.\fR 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)\.
.P
\fB3\.\fR 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\.
.P
\fB4\.\fR 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"
.P
\fB1\.\fR 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\.
.P
\fB**\fR 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 Hosts Sources"
.TP
On each line of \fB/etc/hosts\.sources\fR, after \fB#\fR is commented/skipped\.
.P
.P
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\.
.P
.P
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" 2
GitHub Projects \fIhttps://github\.com/prurigro\fR
.
.IP "\(bu" 2
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\.