Report starting services with systemctl start instead of ynh_systemd_action

This commit is contained in:
Alexandre Aubin 2021-01-07 18:37:51 +01:00
parent a47f5952cd
commit 2650e4cc4b

View file

@ -1365,6 +1365,11 @@ class Script(TestSuite):
"and should be avoided at all cost. Use 'reload' instead."
)
@test()
def raw_systemctl_start(self):
if self.containsregex(r'systemctl start [^. ]+(\.service)?'):
yield Warning("Please do not use 'systemctl start' to start services. Instead, you should use ynh_systemd_action which will display the service log in case it fails to start. You can also use --line_match to wait until some specific word appear in the log, signaling the service indeed fully started.")
@test()
def quiet_systemctl_enable(self):