Hi,
It’s maybe a stupid question but when I install AGH via dietpi-software, the service adguardhome is installed running with adguardhome as user.
As such not an issue, but running the official CLI commands like AdGuardHome -s restart
don’t work since running under adguardhome (which one can’t log in with)
One needs to ‘AdGuardHome -s install’ in order to exec the above.
There is also a difference in /etc/systemd/system files.
The dietpi adguardhome.service looks like this
[Unit]
Description=AdGuard Home (DietPi)
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=60
StartLimitBurst=5
[Service]
User=adguardhome
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW
ExecStart=/mnt/dietpi_userdata/adguardhome/AdGuardHome
ExecReload=/mnt/dietpi_userdata/adguardhome/AdGuardHome -s reload
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
whereas the ‘standard’ AdguardHome.service
[Unit]
Description=AdGuard Home: Network-level blocker
ConditionFileIsExecutable=/mnt/dietpi_userdata/adguardhome/AdGuardHome
After=syslog.target network-online.target
[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStartPre=/bin/mkdir -p /var/log/
ExecStart=/mnt/dietpi_userdata/adguardhome/AdGuardHome "-s" "run"
WorkingDirectory=/mnt/dietpi_userdata/adguardhome
StandardOutput=file:/var/log/AdGuardHome.out
StandardError=file:/var/log/AdGuardHome.err
Restart=always
RestartSec=10
EnvironmentFile=-/etc/sysconfig/AdGuardHome
[Install]
WantedBy=multi-user.target
So my question is why the difference exists. Sure systemctl replaces the CLI commands, but my question is out of curiosity.
Cheers,
Eddy