add the systemd service start/stop enable/disable bits
This commit is contained in:
parent
c1447ecc7c
commit
20b7747ff4
31
torque.spec
31
torque.spec
@ -115,7 +115,12 @@ BuildRequires: tcl-devel
|
|||||||
BuildRequires: tk-devel
|
BuildRequires: tk-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||||
|
BuildRequires: systemd
|
||||||
|
Requires(post): systemd
|
||||||
|
Requires(preun): systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?doxydoc}
|
%if 0%{?doxydoc}
|
||||||
BuildRequires: graphviz
|
BuildRequires: graphviz
|
||||||
@ -561,31 +566,55 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%post mom
|
%post mom
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||||
|
%systemd_post pbs-mom.service
|
||||||
|
%else
|
||||||
/sbin/chkconfig --add pbs_mom
|
/sbin/chkconfig --add pbs_mom
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun mom
|
%preun mom
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||||
|
%systemd_preun pbs-mom.service
|
||||||
|
%else
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
/sbin/service pbs_mom stop >/dev/null 2>&1
|
/sbin/service pbs_mom stop >/dev/null 2>&1
|
||||||
/sbin/chkconfig --del pbs_mom
|
/sbin/chkconfig --del pbs_mom
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%post scheduler
|
%post scheduler
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||||
|
%systemd_post pbs-sched.service
|
||||||
|
%else
|
||||||
/sbin/chkconfig --add pbs_sched
|
/sbin/chkconfig --add pbs_sched
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun scheduler
|
%preun scheduler
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||||
|
%systemd_preun pbs-sched.service
|
||||||
|
%else
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
/sbin/service pbs_sched stop >/dev/null 2>&1
|
/sbin/service pbs_sched stop >/dev/null 2>&1
|
||||||
/sbin/chkconfig --del pbs_sched
|
/sbin/chkconfig --del pbs_sched
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%post server
|
%post server
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||||
|
%systemd_post pbs-server.service
|
||||||
|
%else
|
||||||
/sbin/chkconfig --add pbs_server
|
/sbin/chkconfig --add pbs_server
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun server
|
%preun server
|
||||||
|
%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
|
||||||
|
%systemd_preun pbs-server.service
|
||||||
|
%else
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
/sbin/service pbs_server stop >/dev/null 2>&1
|
/sbin/service pbs_server stop >/dev/null 2>&1
|
||||||
/sbin/chkconfig --del pbs_server
|
/sbin/chkconfig --del pbs_server
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root, -)
|
%defattr(-, root, root, -)
|
||||||
|
Loading…
Reference in New Issue
Block a user