From 2650e4cc4b279f2ba5b5efc68e939be52ceb169f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 7 Jan 2021 18:37:51 +0100 Subject: [PATCH] Report starting services with systemctl start instead of ynh_systemd_action --- package_linter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package_linter.py b/package_linter.py index 1270a9d..7840fc1 100755 --- a/package_linter.py +++ b/package_linter.py @@ -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):