From 171617cb8a01a946ec4ffadf3d15a80cd0ad9a7e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 29 Jan 2019 00:35:23 +0100 Subject: [PATCH] Complain about attempts to restart nginx --- package_linter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package_linter.py b/package_linter.py index e83890c..8ef7662 100755 --- a/package_linter.py +++ b/package_linter.py @@ -397,6 +397,8 @@ def check_deprecated_practices(script): if "dd if=/dev/urandom" in script["raw"] or "openssl rand" in script["raw"]: print_warning("Instead of 'dd if=/dev/urandom' or 'openssl rand', you might want to use ynh_string_random") + if "systemctl restart nginx" in script["raw"] or "service nginx restart" in script["raw"]: + print_wrong("Restarting nginx is quite dangerous (especially for web installs) and should be avoided at all cost. Use 'reload' instead.") def main(): if len(sys.argv) != 2: