-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation on FreeBSD/TrueNAS jails #5431
Comments
Merge in DNS/adguard-home from 5431-freebsd-install-script to master Updates #5431. Squashed commit of the following: commit a36127e Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Feb 7 15:45:35 2023 +0300 all: imp docs commit c0f2f68 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Feb 7 14:20:57 2023 +0300 scripts: add fetch(1) support
@sidbena, hello. We've updated the installation script and the Also, could you please provide some details on the third part? We're ready to make these changes but we'd like to have some documentation to make sure that we're understand what kind of issue we're solving here. Thanks. |
Hello again,
So something relating to installing AdGuardHome as a service is failing. Regarding the third part, I'm referring to the rc script that the service installation is installing, which seems to be this:
Compare that to the rc script that's installed with the port installer that I linked to and you'll notice that there are a few additional variables and features being usable with that, such as defining a working folder, a config file path and others. When I setup AdGuardHome in a jail I like being able to define a config path that's mounted so that I can easily transfer my config to a new jail should I need to. |
@sidbena, thanks for a thorough report, we're looking into the script. For now, could you please help us a bit more? We'd like to see the output of manual service installation with something like: sudo ./AdGuardHome -v -s install You may download the archive with binary file directly from our server, just like the installation script does: fetch -o ./agh.tar.gz https://static.adtidy.org/adguardhome/release/AdGuardHome_freebsd_amd64.tar.gz The |
By the looks of things, that actually went OK.
Does something differ in the two ways to install AdGuardHome as a service? I.e. with using the install script and with using the binary itself? |
Merge in DNS/adguard-home from 5431-sudo-install to master Updates #5431. Squashed commit of the following: commit 4dc9d8d Merge: 29b3d8e be43ce1 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 17:46:33 2023 +0300 Merge branch 'master' into 5431-sudo-install commit 29b3d8e Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 17:31:43 2023 +0300 scripts: fix code commit 4354e20 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 17:11:48 2023 +0300 scripts: imp code commit 4953b76 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 16:50:16 2023 +0300 scripts: add sudo to freebsd service install
@sidbena, I see. We've just pushed the fixed script, could you please check the one? We seem to have omitted the necessary privileges from the action of installing the service. |
I tried running the install script again and noticed this line in the output;
Therefor re-running the script could be done with:
but perhaps I'm misinterpreting something, or I've missed something vital you're doing in the process. I think it'd be good to check for |
Merge in DNS/adguard-home from 5431-freebsd-install-script to master Updates AdguardTeam#5431. Squashed commit of the following: commit a36127e Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Feb 7 15:45:35 2023 +0300 all: imp docs commit c0f2f68 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Feb 7 14:20:57 2023 +0300 scripts: add fetch(1) support
Merge in DNS/adguard-home from 5431-sudo-install to master Updates AdguardTeam#5431. Squashed commit of the following: commit 4dc9d8d Merge: 29b3d8e be43ce1 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 17:46:33 2023 +0300 Merge branch 'master' into 5431-sudo-install commit 29b3d8e Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 17:31:43 2023 +0300 scripts: fix code commit 4354e20 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 17:11:48 2023 +0300 scripts: imp code commit 4953b76 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Feb 16 16:50:16 2023 +0300 scripts: add sudo to freebsd service install
Having the same problem. Looks like the script knows it's running as root, but still tries to run sudo anyway. (I haven't tested with the unreleased commits). Script should not run sudo if it's running as root. It should actually never run sudo , but ask the user to run the script as root. I know why you might refrain from it - internet script piped to shell and everything, but since sudo is needed later, this is not real security anyway. By the way, is there a way to NOT remove the installed files. Presumably I could fix this install easily just by moving the init script where it's supposed to go, but by the end of a failed run, everything is deleted. Note that I just pkg installed sudo to have the script complete.
|
Prerequisites
I have checked the Wiki and Discussions and found no answer
I have searched other issues and found no duplicates
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
orwget
, but they do have the nativefetch
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 tofetch
(fetch -o - https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
) but the script quickly realizes thatcurl
orwget
isn't available and exits.I would like TrueNAS jails to be natively supported, with these changes:
fetch
instead:fetch
installs on TrueNAS/FreeBSD, and install into%%PREFIX%%/bin/<product_name>
.rc.d
script for service installations on TrueNAS/FreeBSD to support RC variables, such asadguard_enable
,working_directory
orlog_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 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!
The text was updated successfully, but these errors were encountered: