Fix bunkerweb linux scripts

This commit is contained in:
Théophile Diot 2023-09-25 19:16:19 +01:00
parent 81b5e80da6
commit 153e9fecf1
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
2 changed files with 2 additions and 15 deletions

View file

@ -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

View file

@ -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