Updated pihole_cloudflared_setup.sh

This commit is contained in:
Steven Seifried 2022-01-16 19:50:26 +01:00
parent a45e1caa1a
commit 548fa18ef8
No known key found for this signature in database
GPG key ID: 174371A9356D63E5

View file

@ -39,9 +39,9 @@ apt-get -qqy install \
sudo &>/dev/null sudo &>/dev/null
msg "Installing cloudflared.." msg "Installing cloudflared.."
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb &>/dev/null
sudo apt-get install ./cloudflared-linux-amd64.deb sudo apt-get install ./cloudflared-linux-amd64.deb &>/dev/null
sudo useradd -s /usr/sbin/nologin -r -M cloudflared sudo useradd -s /usr/sbin/nologin -r -M cloudflared &>/dev/null
$CLOUDFLARED_CONF="/etc/default/cloudflared" $CLOUDFLARED_CONF="/etc/default/cloudflared"
$CLOUDFLARED_SERVICE="/etc/systemd/system/cloudflared.service" $CLOUDFLARED_SERVICE="/etc/systemd/system/cloudflared.service"
@ -53,7 +53,6 @@ EOF
chown cloudflared:cloudflared /etc/default/cloudflared chown cloudflared:cloudflared /etc/default/cloudflared
chown cloudflared:cloudflared /usr/local/bin/cloudflared chown cloudflared:cloudflared /usr/local/bin/cloudflared
systemctl daemon-reload
cat << EOF > $CLOUDFLARED_SERVICE cat << EOF > $CLOUDFLARED_SERVICE
[Unit] [Unit]
@ -73,6 +72,8 @@ KillMode=process
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl daemon-reload
msg "Installing Pi-hole.." msg "Installing Pi-hole.."
curl -sSL https://install.pi-hole.net | bash curl -sSL https://install.pi-hole.net | bash