Commit b5686aad authored by Ziirish's avatar Ziirish

fix: try to detect burp-server misconfiguration (see #323)

parent 3a0ef148
Pipeline #1712 passed with stages
in 23 minutes and 37 seconds
......@@ -32,6 +32,24 @@ appStart () {
echo "Starting burp-server..."
supervisorctl start burp-server >/dev/null
echo "Checking burp-server status..."
sleep 3
if ! supervisorctl status burp-server | awk '{print $2}' | grep -q RUNNING; then
echo "There seem to be a problem with your burp-server setup. Trying to fix it..."
if [ $(ls /etc/burp/ | grep -vE "^(burpui|bui.*).cfg$" | wc -l) != 0 ]; then
echo "Saving your current config into the 'sav' sub-directory"
mkdir /etc/burp/sav
mkdir /tmp/buisav
mv /etc/burp/burpui.cfg /etc/burp/bui* /tmp/buisav || true
mv /etc/burp/* /etc/burp/sav/ || true
mv /tmp/buisav/* /etc/burp/
fi
echo "Copying default known good config..."
cp -a /etc/ori.burp/* /etc/burp/
supervisorctl restart burp-server
fi
# wait a bit for the logs to be populated
sleep 2
......
......@@ -50,6 +50,8 @@ listen = 0.0.0.0:5971
max_children = 5
EOF
cp -a /etc/burp /etc/ori.burp
# cleanup
delgroup ping
rm -rf ~/.cache
......@@ -48,9 +48,8 @@ services:
- pgsql
ports:
- 127.0.0.1:5000:8000
volumes:
- /etc/burp:/etc/burp
- /var/spool/burp:/var/spool/burp
volumes_from:
- burp-server
# Additionally, you can override some default settings
# environment:
# - BURPUI_CONFIG=/etc/burp/burpui.cfg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment