<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span style="font-family: 'times new roman', 'new york', times, serif;">Hi Guys,</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="font-family: 'times new roman', 'new york', times, serif;">I am trying to test some code with respect to my services setup. I have two services, lets say service_a and service_b. In service_a unit file I have this:</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent;
font-style: normal;"><span style="font-family: 'times new roman', 'new york', times, serif;"><span style="font-size: 16px;">OnFailure=service_b</span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="font-size: 16px; font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="font-family: 'times new roman', 'new york', times, serif;">And from the man page for OnFailure unit I get this:</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="font-family: 'times new roman', 'new york',
times, serif;"><span style="font-size: 16px;">A space-separated list of one or more units that are activated when this unit enters the "</span><span style="background-color: transparent;">failed</span><span style="background-color: transparent;">" state</span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="background-color: transparent; font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="background-color: transparent; font-family: 'times new roman', 'new york', times, serif;">My question is, to test this setup, how can I have service_a in a "failed" state? I have tried using kill -9, but that leaves service in "signal" state and not "failed" state. How can I manually set a service in "failed" state so that service_b gets started for my
testing? Any specific signal? Any help much appreciated.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="background-color: transparent; font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; background-color: transparent; font-style: normal;"><span style="background-color: transparent; font-family: 'times new roman', 'new york', times, serif;">Thanks.</span></div></div></body></html>