mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-21 06:45:24 -06:00
67 lines
1.4 KiB
Bash
Executable file
67 lines
1.4 KiB
Bash
Executable file
#!/bin/ash
|
|
# Build: @build@
|
|
set -e
|
|
|
|
SETUP_DIR="/app/setup"
|
|
CONFIG_DIR="${SETUP_DIR}/config"
|
|
|
|
mkdir -p /var/log/supervisor
|
|
|
|
# configure supervisord log rotation
|
|
cat > /etc/logrotate.d/supervisord <<EOF
|
|
/var/log/supervisor/*.log {
|
|
weekly
|
|
missingok
|
|
rotate 52
|
|
compress
|
|
delaycompress
|
|
notifempty
|
|
copytruncate
|
|
}
|
|
EOF
|
|
|
|
mkdir /etc/supervisor.d
|
|
# configure supervisord to start crond
|
|
cat > /etc/supervisor.d/cron.ini <<EOF
|
|
[program:cron]
|
|
priority=20
|
|
directory=/tmp
|
|
command=/usr/sbin/crond -f
|
|
user=root
|
|
autostart=false
|
|
autorestart=true
|
|
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
|
stderr_logfile=/var/log/supervisor/%(program_name)s.log
|
|
EOF
|
|
|
|
# configure supervisord API
|
|
cat > /etc/supervisor.d/api.ini <<EOF
|
|
[inet_http_server]
|
|
port = 0.0.0.0:9001
|
|
EOF
|
|
|
|
# configure burp
|
|
cat >/etc/supervisor.d/burp-server.ini <<EOF
|
|
[program:burp-server]
|
|
command=/usr/sbin/burp -c /etc/burp/burp-server.conf -F
|
|
autostart=false
|
|
autorestart=true
|
|
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
|
stderr_logfile=/var/log/supervisor/%(program_name)s.log
|
|
EOF
|
|
|
|
# add a dedicated listen port for burp-ui restorations
|
|
cat >>/etc/burp/burp-server.conf<<EOF
|
|
listen = 0.0.0.0:5971
|
|
max_children = 5
|
|
listen_status = 0.0.0.0:4972
|
|
max_status_children = 10
|
|
EOF
|
|
|
|
# the following file is checked by the burp-ui image
|
|
touch /etc/burp/this_is_a_decoy_file_to_know_if_we_can_chown
|
|
cp -a /etc/burp /etc/ori.burp
|
|
|
|
# cleanup
|
|
delgroup ping
|
|
rm -rf ~/.cache
|