mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-18 14:38:42 +00:00
21 lines
No EOL
338 B
Bash
Executable file
21 lines
No EOL
338 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
|
|
systemctl stop haproxy
|
|
systemctl start haproxy
|
|
|
|
echo "hello" > /opt/bunkerweb/www/index.html |