I'm trying to build a rpm package that enable a systemd service the proper way.
In my rpm spec file, I added:
%{?systemd_requires}
BuildRequires: systemd
...
%postun
%systemd_postun yeah.service
My rpm copy in /usr/lib/systemd/system/ the yeah.service file.
But after package installation, the service is still disable:
root@ansible-1:1:~# systemctl status yeah
Unit yeah.service could not be found.
root@ansible-1:1:~# rpm -Uvh /home/intersec/delivery/yeah.rpm
Preparing... ################################# [100%]
Updating / installing...
1:yeah################################# [100%]
root@ansible-1:1:~# systemctl status yeah
● yeah.service - Yeah
Loaded: loaded (/usr/lib/systemd/system/yeah.service; disabled; vendor preset: disabled)
Active: inactive (dead)
What's wrong?
Raoul