Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate ood-portal.conf when Apache starts or is reloaded #371

Merged
merged 2 commits into from
Mar 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packaging/ondemand.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ Source2: ondemand-selinux.fc
%bcond_with scl_apache
%define apache_confd /etc/httpd/conf.d
%define apache_service httpd
%define apache_daemon /usr/sbin/httpd
%define htcacheclean_service htcacheclean
%else
%bcond_without scl_apache
%define apache_confd /opt/rh/httpd24/root/etc/httpd/conf.d
%define apache_service httpd24-httpd
%define apache_daemon /opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper
%define htcacheclean_service httpd24-htcacheclean
%endif

Expand Down Expand Up @@ -233,6 +235,15 @@ PrivateTmp=false
EOF
%__chmod 444 %{buildroot}%{_sysconfdir}/systemd/system/%{apache_service}.service.d/ood.conf
%endif
%__cat >> %{buildroot}%{_sysconfdir}/systemd/system/%{apache_service}.service.d/ood-portal.conf << EOF
[Service]
ExecStartPre=-/opt/ood/ood-portal-generator/sbin/update_ood_portal --rpm
ExecReload=
ExecReload=-/opt/ood/ood-portal-generator/sbin/update_ood_portal --rpm
ExecReload=%{apache_daemon} \$OPTIONS -k graceful
EOF
%__chmod 444 %{buildroot}%{_sysconfdir}/systemd/system/%{apache_service}.service.d/ood-portal.conf
%endif
EOS

%post
Expand Down Expand Up @@ -382,6 +393,7 @@ fi
%ghost %{apache_confd}/ood-portal.conf
%if %{with systemd}
%config(noreplace) %{_sysconfdir}/systemd/system/%{apache_service}.service.d/ood.conf
%config(noreplace,missingok) %{_sysconfdir}/systemd/system/%{apache_service}.service.d/ood-portal.conf
%endif

%files -n %{gems_name}
Expand Down