Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rpm-icingaweb2-module-reporting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
packaging
rpm-icingaweb2-module-reporting
Commits
2add201e
Commit
2add201e
authored
5 years ago
by
Markus Frosch
Browse files
Options
Downloads
Patches
Plain Diff
Add systemd service
parent
cddbe33b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#5151
failed
5 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
icinga-reporting.service
+11
-0
11 additions, 0 deletions
icinga-reporting.service
icingaweb2-module-reporting.spec
+53
-0
53 additions, 0 deletions
icingaweb2-module-reporting.spec
with
64 additions
and
0 deletions
icinga-reporting.service
0 → 100644
+
11
−
0
View file @
2add201e
[Unit]
Description
=
Icinga Reporting Scheduler
[Service]
Type
=
simple
User
=
icingaweb2
ExecStart
=
/usr/bin/icingacli reporting schedule run
Restart
=
on-success
[Install]
WantedBy
=
multi-user.target
This diff is collapsed.
Click to expand it.
icingaweb2-module-reporting.spec
+
53
−
0
View file @
2add201e
...
@@ -17,6 +17,10 @@ Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archi
...
@@ -17,6 +17,10 @@ Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archi
BuildArch: noarch
BuildArch: noarch
%global basedir %{_datadir}/icingaweb2/modules/%{module_name}
%global basedir %{_datadir}/icingaweb2/modules/%{module_name}
%global service_name icinga-%{module_name}
BuildRequires: systemd-devel
Requires: systemd
Requires: icingaweb2 >= %{icingaweb_min_version}
Requires: icingaweb2 >= %{icingaweb_min_version}
Requires: php-Icinga >= %{icingaweb_min_version}
Requires: php-Icinga >= %{icingaweb_min_version}
...
@@ -47,12 +51,44 @@ mkdir -p %{buildroot}%{basedir}
...
@@ -47,12 +51,44 @@ mkdir -p %{buildroot}%{basedir}
cp -r * %{buildroot}%{basedir}
cp -r * %{buildroot}%{basedir}
install -d %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{service_name}.service
%if "%{_vendor}" == "suse"
install -d %{buildroot}%{_sbindir}
ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{service_name}
%endif # suse
%clean
%clean
rm -rf %{buildroot}
rm -rf %{buildroot}
%pre
%if "%{_vendor}" == "suse"
%service_add_pre %{service_name}.service
%endif # suse
exit 0
%post
set -e
%if "%{_vendor}" == "suse"
%service_add_post %{service_name}.service
%else # suse
%systemd_post %{service_name}.service
%endif # suse
exit 0
%preun
%preun
set -e
set -e
%if "%{_vendor}" == "suse"
%service_del_preun %{service_name}.service
%else # suse
%systemd_preun %{service_name}.service
%endif # suse
# Only for removal
# Only for removal
if [ $1 == 0 ]; then
if [ $1 == 0 ]; then
echo "Disabling icingaweb2 module '%{module_name}'"
echo "Disabling icingaweb2 module '%{module_name}'"
...
@@ -61,12 +97,29 @@ fi
...
@@ -61,12 +97,29 @@ fi
exit 0
exit 0
%postun
set -e
%if "%{_vendor}" == "suse"
%service_del_postun %{service_name}.service
%else # suse
%systemd_postun_with_restart %{service_name}.service
%endif # suse
exit 0
%files
%files
%doc README.md LICENSE
%doc README.md LICENSE
%defattr(-,root,root)
%defattr(-,root,root)
%{basedir}
%{basedir}
%{_unitdir}/%{service_name}.service
%if "%{_vendor}" == "suse"
%{_sbindir}/rc%{service_name}
%endif # suse
%changelog
%changelog
* Fri Aug 30 2019 Markus Frosch <markus.frosch@icinga.com> - 0.9.1-1
* Fri Aug 30 2019 Markus Frosch <markus.frosch@icinga.com> - 0.9.1-1
- Initial package version
- Initial package version
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment