From 084ce4e314310d593b143491c16d034fb3323cd3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 4 Dec 2021 19:02:58 +0100 Subject: [PATCH] =?UTF-8?q?Web=20applications=20are=20supposed=20to=20be?= =?UTF-8?q?=20installed=20in=20/var/www/$app,=20not=20/opt/=20=C3=A9=5F?= =?UTF-8?q?=C3=A8=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package_linter.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package_linter.py b/package_linter.py index 58d30be..c696fdc 100755 --- a/package_linter.py +++ b/package_linter.py @@ -812,6 +812,14 @@ class App(TestSuite): ): yield Error("Don't do black magic with /etc/ssowat/conf.json.persistent!") + + @test() + def bad_final_path_location(self): + if os.system(f"grep -q -nr 'ynh_webpath_register' {self.path}/scripts/install 2>/dev/null") == 0 \ + and os.system(f"grep -q -nr 'final_path=/opt' {self.path}/scripts/install {self.path}/scripts/_common.sh 2>/dev/null") == 0: + yield Warning("Web applications are not supposed to be installed in /opt/ ... They are supposed to be installed in /var/www/$app :/") + + @test() def app_data_in_unofficial_dir(self):