From 153e9fecf189a0ba8943b9d2d684bd3a0ce414b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Diot?= Date: Mon, 25 Sep 2023 19:16:19 +0100 Subject: [PATCH] Fix bunkerweb linux scripts --- src/linux/scripts/bunkerweb-ui.sh | 6 ++---- src/linux/scripts/postinstall.sh | 11 ----------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/linux/scripts/bunkerweb-ui.sh b/src/linux/scripts/bunkerweb-ui.sh index 99d67c85..b2dd2ca4 100755 --- a/src/linux/scripts/bunkerweb-ui.sh +++ b/src/linux/scripts/bunkerweb-ui.sh @@ -1,7 +1,7 @@ #!/bin/bash # Set the PYTHONPATH -export PYTHONPATH=/usr/share/bunkerweb/deps/python:/usr/share/bunkerweb/ui +export PYTHONPATH=/usr/share/bunkerweb/deps/python/:/usr/share/bunkerweb/ui/ # Create the ui.env file if it doesn't exist if [ ! -f /etc/bunkerweb/ui.env ]; then @@ -12,10 +12,8 @@ fi # Function to start the UI start() { echo "Starting UI" - source /etc/bunkerweb/ui.env export $(cat /etc/bunkerweb/ui.env) - python3 -m gunicorn --config /usr/share/bunkerweb/ui/gunicorn.conf.py --user nginx --group nginx --bind 127.0.0.1:7000 & - echo $! > /var/run/bunkerweb/ui.pid + python3 -m gunicorn --config /usr/share/bunkerweb/ui/gunicorn.conf.py --user nginx --group nginx --bind "127.0.0.1:7000" & } # Function to stop the UI diff --git a/src/linux/scripts/postinstall.sh b/src/linux/scripts/postinstall.sh index 79ded46c..61c43b5f 100644 --- a/src/linux/scripts/postinstall.sh +++ b/src/linux/scripts/postinstall.sh @@ -15,12 +15,6 @@ function do_and_check_cmd() { return 0 } -#Start the nginx service if it is not already running -# if ! systemctl is-active nginx; then -# echo "Starting nginx service..." -# do_and_check_cmd systemctl start nginx -# fi - # Give all the permissions to the nginx user echo "Setting ownership for all necessary directories to nginx user and group..." do_and_check_cmd chown -R nginx:nginx /usr/share/bunkerweb /var/cache/bunkerweb /var/lib/bunkerweb /etc/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb @@ -35,11 +29,6 @@ echo "Enabling and starting bunkerweb service..." do_and_check_cmd systemctl enable bunkerweb do_and_check_cmd systemctl start bunkerweb -# Start and enable bunkerweb-ui service -# echo "Enabling and starting bunkerweb-ui service..." -# do_and_check_cmd systemctl enable bunkerweb-ui -# do_and_check_cmd systemctl start bunkerweb-ui - # Copy old line from environment file to new one # Check if old environment file exists if [ -f /var/tmp/variables.env ]; then