【发布时间】:2018-11-22 17:25:07
【问题描述】:
我正在尝试构建一个能够以正确方式启用 systemd 服务的 rpm 包。
在我的 rpm 规范文件中,我添加了:
%{?systemd_requires}
BuildRequires: systemd
...
%postun
%systemd_postun yeah.service
我的 rpm 副本在 /usr/lib/systemd/system/ 中的yeah.service 文件。
但是在安装包之后,服务仍然被禁用:
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)
怎么了?
拉乌尔
【问题讨论】: