AdguardTeam / AdguardTeam/AdGuardHome

Script to automate update for non-root AGH service

オープン
#5,525 コメント 0 件 リアクション 1 件 担当者 1 名 @ainar-g が担当を希望しています GitHub で見る
documentation
主要言語
TypeScript
スター
36.9k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

### Prerequisites

- [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) and found no answer

- [X] I have searched other issues and found no duplicates

- [X] I want to request a feature or enhancement and not ask a question

### Description

#### What problem are you trying to solve?

For security, I run AdGuardHome as a non-root service using systemctl and the adguard user. I use `AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW` to enable AGH to bind to privileged ports.

Unfortunately this means AGH will not autoupdate from the web-gui, as it sees that the binary is not owned by root.

#### Proposed solution

I have created an [update script](https://github.com/eccgecko/AdGuardHome/blob/master/scripts/AdGuardHomeUpdate_linux_arm64.sh) for my 64-bit raspberry pi to automate the process of manually downloading and installing the new binary. My script downloads both the tarball and checksum.txt into /tmp/ and performs a checksum, before backing up the config file and data directory into the user's $HOME directory, then copying the new binary into /opt/AdGuardHome/ and restarting the AdGuardHome.service using systemctl.

#### Alternatives considered

#### Additional information

The script is my first attempt, hence I did not feel ready to make a PR. It works on my system, but probably requires looking over by more advanced eyes than mine.

As it is currently written, it does not perform an architecture check, and thus only works on linux_arm64 machines. If your system is different you will need to edit the `TARBALL="AdGuardHome_linux_arm64.tar.gz"` line to match your system.

It would be great if someone could add in an arch check and edit it to download the relevant arch automatically.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。