AdguardHome vs adguardhome

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

We decided to run most of our applications as individual users and not with root user privileges. Let’s call it some kind of security layer and best practices. Running AdGuardHome -s install should have installed a concurrent service, which is started as root user, undermining the idea to have apps running with less privileges as possible.

root@DietPiR5S:~# ps -ef | grep home
adguard+     564       1  1 10:30 ?        00:00:03 /mnt/dietpi_userdata/adguardhome/AdGuardHome
root         567       1  0 10:30 ?        00:00:01 /mnt/dietpi_userdata/adguardhome/AdGuardHome -s run
root        1056     987  0 10:35 pts/0    00:00:00 grep home
root@DietPiR5S:~#

Yes because executable is not located within path that is included within the env variable.

correct, use systemctl restart adguardhome if you like to restart the service

Thanks for the clear explanation