Blame SOURCES/rhcd-stop.service.in

a2e6b5
# This file is part of rhc.
a2e6b5
#
a2e6b5
# Any changes made to this file will be overwritten during a software update. To
a2e6b5
# override a parameter in this file, create a drop-in file, typically located at
a2e6b5
# /etc/systemd/system/rhcd-stop.service.d/override.conf. Put the desired
a2e6b5
# overrides in that file and reload systemd. The next time this service is run
a2e6b5
# (either manually or via a systemd timer), the overridden values will be in
a2e6b5
# effect.
a2e6b5
#
a2e6b5
# For more information about systemd drop-in files, see systemd.unit(5).
a2e6b5
a2e6b5
[Unit]
a2e6b5
Description=Automatically stop rhcd when rhsm cert does not exists
a2e6b5
ConditionPathExists=!@sysconfdir@/pki/consumer/cert.pem
a2e6b5
a2e6b5
[Service]
a2e6b5
Type=simple
a2e6b5
ExecStart=/bin/systemctl stop rhcd.service
a2e6b5
ExecStopPost=/bin/systemctl unmask --now rhcd.path
a2e6b5
ExecStopPost=/bin/systemctl start rhcd.path