mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-19 23:18:25 +00:00
25 lines
No EOL
522 B
Bash
Executable file
25 lines
No EOL
522 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ $(id -u) -ne 0 ] ; then
|
|
echo "❌ Run me as root"
|
|
exit 1
|
|
fi
|
|
|
|
DNF=$(which dnf)
|
|
APT=$(which apt)
|
|
|
|
if [ ! -z $DNF ] ; then
|
|
dnf install -y haproxy
|
|
elif [ ! -z $APT ] ; then
|
|
apt install -y haproxy
|
|
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
|
|
haproxy -f /etc/haproxy/haproxy.cfg > /tmp/haproxy.log &
|
|
|
|
echo "hello" > /opt/bunkerweb/www/index.html |