diff --git a/examples/drupal/setup-linux.sh b/examples/drupal/setup-linux.sh index 884a63431..5f7aa3263 100755 --- a/examples/drupal/setup-linux.sh +++ b/examples/drupal/setup-linux.sh @@ -15,9 +15,11 @@ else fi curl https://www.drupal.org/download-latest/tar.gz -Lo /tmp/drupal.tar.gz tar -xzf /tmp/drupal.tar.gz -C /tmp +current_dir="$(pwd)" cd /tmp/drupal-* cp -r * /opt/bunkerweb/www chown -R $user:nginx /opt/bunkerweb/www find /opt/bunkerweb/www -type f -exec chmod 0640 {} \; find /opt/bunkerweb/www -type d -exec chmod 0750 {} \; -cp -r bw-data/configs/* /opt/bunkerweb/configs +cd "$current_dir" +cp -r ./bw-data/configs/* /opt/bunkerweb/configs diff --git a/tests/LinuxTest.py b/tests/LinuxTest.py index 1f9eaef94..0a2dd8538 100644 --- a/tests/LinuxTest.py +++ b/tests/LinuxTest.py @@ -98,11 +98,11 @@ class LinuxTest(Test) : Test.replace_in_files(test, ex_domain, test_domain) Test.rename(test, ex_domain, test_domain) Test.replace_in_files(test, "example.com", getenv("ROOT_DOMAIN")) + proc = LinuxTest.docker_cp(self.__distro, test, "/opt/" + self._name) + if proc.returncode != 0 : + raise(Exception("docker cp failed (test)")) setup = test + "/setup-linux.sh" if isfile(setup) : - proc = LinuxTest.docker_cp(self.__distro, test, "/opt/" + self._name) - if proc.returncode != 0 : - raise(Exception("docker cp failed (test)")) proc = LinuxTest.docker_exec(self.__distro, "cd /opt/" + self._name + " && ./setup-linux.sh") if proc.returncode != 0 : raise(Exception("docker exec setup failed (test)"))