Register service during installation

This commit is contained in:
Denis Silakov 2014-09-04 14:55:24 +04:00
parent 42992ae56f
commit de6a9d190d

View file

@ -1,7 +1,7 @@
Summary: The UPNP & NAT-PMP implementation
Name: miniupnpd
Version: 1.8.20140523
Release: 2
Release: 3
License: GPLv2
Group: System/Servers
URL: http://miniupnp.free.fr
@ -51,6 +51,15 @@ rm -f %{buildroot}%{_sysconfdir}/init.d/miniupnpd
rm -f %{buildroot}%{_sysconfdir}/miniupnpd/miniupnpd.conf~
install -D -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%files
%{_sbindir}/miniupnpd
%{_unitdir}/miniupnpd*