Sample Header Ad - 728x90

Chef-Client service restarting on its own

0 votes
0 answers
528 views
I run chef-client on some of my servers and want to be able to stop the service in case of testing or emergencies. However, when I stop the service using systemctl chef-client will resurrect itself within 5 minutes of stopping the service. Within the Unit file below I tried removing Restart = always, but the service will still restart and the Retsart = always will appear in the Unit file again. What configuration would I need to change to prevent chef from resurrecting itself? [Unit] Description = Chef Infra Client daemon After = network.target auditd.service [Service] Type = simple EnvironmentFile = /etc/sysconfig/chef-client ExecStart = /opt/chef/bin/chef-client -c $CONFIG -i $INTERVAL -s $SPLAY $OPTIONS ExecReload = /bin/kill -HUP $MAINPID SuccessExitStatus = 3 Restart = always [Install] WantedBy = multi-user.target EDIT: I don't see any cron jobs that are related to chef or any system timers set up.
Asked by aperna (1 rep)
Jul 31, 2021, 10:55 PM
Last activity: Aug 1, 2021, 09:17 PM