add systemd unit file
Update the spec file with the rpm macro to put the unit file
in the system-wide unit file directory based on:
[root@1713bbf19a0b /]# rpmbuild --eval '%{_unitdir}'
/usr/lib/systemd/system
Allow user to create a drop directory to specify options
via environment variables.
Resolves https://github.com/purpleidea/mgmt/issues/12.
This commit is contained in:
3
spec.in
3
spec.in
@@ -40,6 +40,8 @@ rm -rf %{buildroot}
|
||||
# _datadir is typically /usr/share/
|
||||
install -d -m 0755 %{buildroot}/%{_datadir}/__PROGRAM__/
|
||||
cp -a AUTHORS COPYING COPYRIGHT DOCUMENTATION.md README.md THANKS examples/ %{buildroot}/%{_datadir}/__PROGRAM__/
|
||||
mkdir -p %{buildroot}/%{_unitdir}/
|
||||
install -pm 0644 misc/__PROGRAM__.service %{buildroot}/%{_unitdir}/
|
||||
|
||||
# install the binary
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
@@ -58,6 +60,7 @@ install -m 0644 misc/example.conf %{buildroot}%{_sysconfdir}/__PROGRAM__/__PROGR
|
||||
%{_datadir}/__PROGRAM__/*
|
||||
%{_bindir}/__PROGRAM__
|
||||
%{_sysconfdir}/__PROGRAM__/*
|
||||
%{_unitdir}/__PROGRAM__.service
|
||||
|
||||
# this changelog is auto-generated by git log
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user