tests - fix behind-reverse-proxy/linux
This commit is contained in:
parent
6005a8f73b
commit
790fa37aeb
|
@ -49,7 +49,7 @@ try :
|
|||
logger.log("BUNKERNET", "❌", "Received error from BunkerNet API while sending register request : " + data["data"])
|
||||
os._exit(1)
|
||||
bunkernet_id = data["data"]
|
||||
logger.log("BUNKERNET", "ℹ️", "Successfully registered on BunkerNet API with instance id " + get_id())
|
||||
logger.log("BUNKERNET", "ℹ️", "Successfully registered on BunkerNet API with instance id " + data["data"])
|
||||
else :
|
||||
with open("/opt/bunkerweb/cache/bunkernet/instance.id", "r") as f :
|
||||
bunkernet_id = f.read()
|
||||
|
|
|
@ -17,6 +17,7 @@ fi
|
|||
cp haproxy.cfg /etc/haproxy
|
||||
sed -i "s/8080/80/" /etc/haproxy/haproxy.cfg
|
||||
sed -i "s/mybunker/127.0.0.1/" /etc/haproxy/haproxy.cfg
|
||||
systemctl stop bunkerweb
|
||||
systemctl stop haproxy
|
||||
systemctl start haproxy
|
||||
|
||||
|
|
|
@ -59,7 +59,14 @@ class LinuxTest(Test) :
|
|||
proc = LinuxTest.docker_exec(distro, "chown -R nginx:nginx " + dst + "/*")
|
||||
if proc.returncode != 0 :
|
||||
raise(Exception("docker exec failed for directory " + src + " (linux stack)"))
|
||||
# TODO : php install
|
||||
# ubuntu : /etc/php/8.1/fpm/pool.d/www.conf / www-data
|
||||
# debian : /etc/php/7.4/fpm/pool.d/www.conf / www-data
|
||||
# fedora : /etc/php-fpm.d/www.conf / apache
|
||||
# centos : /etc/php-fpm.d/www.conf / apache
|
||||
if self.__distro in ["ubuntu", "debian"] :
|
||||
LinuxTest.docker_exec(distro, "DEBIAN_FRONTEND=noninteractive apt-get install -y php-fpm")
|
||||
elif self.__distro in ["centos", "fedora"] :
|
||||
LinuxTest.docker_exec(distro, "dnf install -y php-fpm")
|
||||
sleep(60)
|
||||
except :
|
||||
log("LINUX", "❌", "exception while running LinuxTest.init()\n" + format_exc())
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[www]
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = /run/php/php-fpm.sock
|
||||
listen.ower = www-data
|
||||
listen.group = nginx
|
||||
listen.mode = 0660
|
Loading…
Reference in New Issue