FBA-DeploymentScripts/install.sh
2020-12-10 00:20:43 +01:00

27 lines
460 B
Bash
Executable File

#!/bin/bash
chmod +x /usr/bin/caddy
groupadd --system caddy
useradd --system \
--gid caddy \
--create-home \
--home-dir /var/lib/caddy \
--shell /usr/sbin/nologin \
--comment "Caddy web server" \
caddy
cp caddy.service /etc/systemd/system/
mkdir /etc/caddy
mkdir /var/www
cp Caddyfile /etc/caddy/
systemctl daemon-reload
systemctl enable caddy
systemctl start caddy
systemctl status caddy
ufw allow proto tcp from 10.25.0.0/24 port 80