-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add conffiles + logrotate + move config file to /etc/opt/adguardhome.…
…yaml
- Loading branch information
Showing
10 changed files
with
106 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
MAKEFLAGS += --silent | ||
|
||
APP_HOME=opt/adguardhome | ||
TAR_FILE = adguardhome-linux-$(VERSION)-$(ARCH).tar.bz2 | ||
TAR_URL = https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(VERSION)/AdGuardHome_linux_$(TAR_ARCH).tar.gz | ||
|
||
VERSION = 0.105.2 | ||
|
||
BUILD_DIR = build | ||
RELEASE_DIR = $(BUILD_DIR)/release | ||
TMP_DIR = $(BUILD_DIR)/tmp | ||
TAR_CACHE = $(BUILD_DIR)/$(TAR_FILE) | ||
PLATFORM := $(shell uname -m) | ||
|
||
ARCH := | ||
ifeq ($(PLATFORM),x86_64) | ||
ARCH = amd64 | ||
endif | ||
ifeq ($(PLATFORM),aarch64) | ||
ARCH = arm64 | ||
endif | ||
ifeq ($(PLATFORM),armv7l) | ||
ARCH = armhf | ||
endif | ||
TAR_ARCH := | ||
ifeq ($(ARCH),amd64) | ||
TAR_ARCH = amd64 | ||
endif | ||
ifeq ($(ARCH),i386) | ||
TAR_ARCH = 386 | ||
endif | ||
ifeq ($(ARCH),armhf) | ||
TAR_ARCH = armv7 | ||
endif | ||
ifeq ($(ARCH),arm64) | ||
TAR_ARCH = arm64 | ||
endif | ||
|
||
package: clean prepare $(TAR_CACHE) cp control | ||
@echo Building package $(VERSION) $(ARCH)... | ||
fakeroot dpkg-deb -b -z9 $(TMP_DIR) $(RELEASE_DIR) | ||
|
||
clean: | ||
rm -rf $(TMP_DIR) $(RELEASE_DIR) | ||
|
||
prepare: | ||
mkdir -p $(RELEASE_DIR) $(TMP_DIR)/$(APP_HOME) | ||
|
||
$(TAR_CACHE): | ||
@echo Downloading tar ball $(VERSION) $(TAR_ARCH)... | ||
wget --quiet -O $(TAR_CACHE) $(TAR_URL) | ||
|
||
cp: | ||
cp -R deb/* $(TMP_DIR) | ||
cp $(TAR_CACHE) $(TMP_DIR)/$(APP_HOME) | ||
tar xf $(TAR_CACHE) --strip-components 2 --directory=$(TMP_DIR)/$(APP_HOME) | ||
rm -rf $(TMP_DIR)/$(APP_HOME)/$(TAR_FILE) | ||
|
||
control: | ||
$(eval SIZE=$(shell du -sbk $(TMP_DIR)/ | grep -o '[0-9]*')) | ||
sed -i "s/{{version}}/$(VERSION)/;s/{{size}}/$(SIZE)/;s/{{architecture}}/$(ARCH)/" $(TMP_DIR)/DEBIAN/control |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,50 @@ | ||
# AdGuardHome package for Debian and Ubuntu | ||
Creates a Debian/Ubuntu package for `AdGuardHome`. | ||
# AdGuardHome package for Debian | ||
Creates a Debian package for `AdGuardHome`. | ||
|
||
`AdGuardHome` is a network-wide ads & trackers blocking DNS server. | ||
|
||
For more information about `AdGuardHome`, please visit https://adguard.com/en/adguard-home/overview.html and https://github.com/AdguardTeam/AdGuardHome | ||
For more information about `AdGuardHome`, please visit https://adguard.com/en/adguard-home/overview.html | ||
and https://github.com/AdguardTeam/AdGuardHome | ||
|
||
## How to install | ||
Select the package for your architecture (amd64, i386, armhf, arm64). | ||
``` | ||
wget -O adguardhome.deb https://github.com/adelolmo/adguardhome-debian/releases/download/v0.98.1/adguardhome_0.98.1_armhf.deb | ||
sudo dpkg -i adguardhome.deb | ||
``` | ||
|
||
wget -O adguardhome.deb https://github.com/adelolmo/adguardhome-debian/releases/download/v0.102.0/adguardhome_0.102.0_armhf.deb | ||
sudo dpkg -i adguardhome.deb | ||
|
||
### How to use | ||
|
||
Use `systemd` to manage the service `adguardhome`. | ||
|
||
``` | ||
sudo systemctl start adguardhome | ||
sudo systemctl stop adguardhome | ||
sudo systemctl restart adguardhome | ||
``` | ||
sudo systemctl start adguardhome | ||
sudo systemctl stop adguardhome | ||
sudo systemctl restart adguardhome | ||
|
||
By default the dashboard is accessible under the port `http://localhost:3000`. | ||
By default, the dashboard is accessible under the port `http://localhost:3000`. | ||
|
||
### How to configure | ||
|
||
The configuration file is located in `/etc/opt/adguardhome/AdGuardHome.yaml`. | ||
The configuration file is located in `/etc/opt/adguardhome.yaml`. | ||
|
||
The log output is created in `/var/log/adguardhome/adguardhome.log`. | ||
|
||
AdGuardHome creates application files under `/var/opt/adguardhome` directory. | ||
AdGuardHome creates runtime application files under `/var/opt/adguardhome` directory. | ||
|
||
Instructions of how to configure `AdGuardHome` are out of the scope of this readme. | ||
Refer to https://github.com/AdguardTeam/AdGuardHome/wiki for details about configuration. | ||
|
||
## How to build | ||
|
||
Clone the project. | ||
git clone https://github.com/adelolmo/adguardhome-debian.git | ||
make VERSION=0.105.2 | ||
|
||
``` | ||
git clone https://github.com/adelolmo/adguardhome-debian.git | ||
``` | ||
The parameter `VERSION` is the version of `AdGuardHome`. | ||
You can find all the releases of `AdGuardHome` [here](https://github.com/AdguardTeam/AdGuardHome/releases). | ||
|
||
Then run the `package` script to download the create the package. | ||
The debian package will be created under `build/releases`. | ||
|
||
``` | ||
./package armhf 0.97.1 | ||
``` | ||
The first parameter is the system architecture, it must be one of: amd64, i386, armhf, arm64. | ||
### Cross platform build | ||
|
||
The second parameter is the version of `AdGuardHome`. You can find all the releases of `AdGuardHome` [here](https://github.com/AdguardTeam/AdGuardHome/releases). | ||
Use the parameter `ARCH` with one of the following supported architectures: amd64, i386, armhf or arm64. | ||
|
||
The debian package will be created under `build/releases`. | ||
make VERSION=0.105.2 ARCH=armhf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/opt/adguardhome.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/var/log/adguardhome/adguardhome.log { | ||
missingok | ||
notifempty | ||
compress | ||
delaycompress | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ dns: | |
port: 53 | ||
bootstrap_dns: | ||
- 1.1.1.1:53 | ||
safebrowsing_enabled: true | ||
safebrowsing_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters