Describe the bug
The installation script attempts to assume control over the systemd services it installs by trying to stop them if they are running. This is fine for systems directly calling the install script, though it introduces issues during AUR package build. It is a better idea to have this happen in post-install, and for the AUR package this does not make sense anyways until the actual package installation runs (where pacman's hooks manage the systemd services).
To Reproduce
Steps to reproduce the behavior:
Build the package with a previous version of fw-fanctrl already installed and actively running
Wait for the packaging process to call install script.
Expected behavior
It should copy the files and create the package successfully without touching any host services.
Error message
==> Starting package()...
creating '/home/icedream/Documents/Source/Git/aur.archlinux.org/fw-fanctrl-git/pkg/fw-fanctrl-git/usr/lib/systemd/system'
creating services
stopping [fw-fanctrl]
Failed to stop fw-fanctrl.service: Access denied
See system logs and 'systemctl status fw-fanctrl.service' for details.
This also pops up a graphical request to allow access to the host systemd.
Environment (please complete the following information):
Hi @icedream , how are you doing?
I have just created a PR #41 to fix this issue, could you please test if this solves your problem when you have some time?
Have a great day
Describe the bug The installation script attempts to assume control over the systemd services it installs by trying to stop them if they are running. This is fine for systems directly calling the install script, though it introduces issues during AUR package build. It is a better idea to have this happen in post-install, and for the AUR package this does not make sense anyways until the actual package installation runs (where pacman's hooks manage the systemd services).
To Reproduce Steps to reproduce the behavior:
Expected behavior It should copy the files and create the package successfully without touching any host services.
Error message
This also pops up a graphical request to allow access to the host systemd.
Environment (please complete the following information):