Score:0

How to avoid ExecStop status in systemctl status

id flag

systemctl status command shows the ExecStop Failure message. Even though my service is up and running.

testDB.service - the testDB service
  Loaded: loaded (/usr/lib/systemd/system/testDB.service; enabled; vendor preset: disabled)
  Active: active (running) since Wed 2022-04-27 15:55:38 IST; 7s ago
 Process: 946 ExecStop=db/testDB/scripts/testDB.init stop (code=exited, status=1/FAILURE)
 Process: 995 ExecStart=db/testDB/scripts/testDB.init start (code=exited, status=0/SUCCESS)

Is there any way to avoid the ExecStop FAILURE message?

Score:-1
es flag

Remove a line which begins from ExecStop from the systemd unit file for your service. Or make sure the script testDB.init stop always returns exit code 0

in flag
It's not a good idea to remove the proper way to stop a service from the systemd unit.
4snok avatar
es flag
well .. I gave TS an alternative option to fix his init script. They are probably not looking for a proper way to stop a service.
id flag
Thank you for the comments both of you. I am checking my script.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.