AdguardTeam / AdguardTeam/AdGuardHome

Installation on FreeBSD/TrueNAS jails

Open
#5,431 8 comments 1 reaction 1 assignee Claimed by @EugeneOne1 View on GitHub
compatibility enhancement
Dominant language
TypeScript
Stars
36.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

### 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 report a bug and not ask a question

### Operating system type

FreeBSD

### CPU architecture

AMD64

### Installation

GitHub releases or script from README

### Setup

On one machine

### AdGuard Home version

v0.107.22

### Description

#### What did you do?
Tried to install AdGuardHome in my TrueNAS jail with the `curl ... | sh` script.

#### Expected result
AdGuardHome installed, possibly with AdGuardHome installed as a service.

#### Actual result
`either curl or wget is required to install AdGuard Home via this script`

#### Screenshots (if applicable)

#### Additional information
If I'm not mistaken, TrueNAS jails by default have no `curl` or `wget`, but they do have the native `fetch` command.
I tried to execute the install command (`curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v`) with my jail, but naturally this fails. So I instead changed to `fetch` (`fetch -o - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v`) but the script quickly realizes that `curl` or `wget` isn't available and exits.

I would like TrueNAS jails to be natively supported, with these changes:

1. Change the README to have a section for TrueNAS/FreeBSD installations to use `fetch` instead:
> `fetch -o - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v`
2. Change the script to support `fetch` installs on TrueNAS/FreeBSD, and install into `%%PREFIX%%/bin/`.
3. Edit the `rc.d` script for service installations on TrueNAS/FreeBSD to support RC variables, such as `adguard_enable`, `working_directory` or `log_file`, as per https://cgit.freebsd.org/ports/tree/www/adguardhome/files/adguardhome.in.
This would also require changing the code in [AdGuardHome/internal/home/service.go](https://github.com/AdguardTeam/AdGuardHome/blob/master/internal/home/service.go) and possibly other files to accommodate this change.

I'm happy to assist with testing on TrueNAS and/or ventilate any questions that might arise.
Thanks in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.