forked from Mirrors/authelia-proxmox-SSO
feat: adapt deploy_authelia.sh for use with ArchLinux
This commit is contained in:
parent
e2d79ffac8
commit
814951bb1f
1 changed files with 2 additions and 42 deletions
|
|
@ -24,13 +24,8 @@ fi
|
|||
# ##### then we install authelia
|
||||
# ####################################
|
||||
|
||||
apt update
|
||||
apt install -y curl gnupg apt-transport-https sudo
|
||||
curl -s https://apt.authelia.com/organization/signing.asc | sudo apt-key add -
|
||||
echo "deb https://apt.authelia.com/stable/debian/debian/ all main" >>/etc/apt/sources.list.d/authelia.list
|
||||
apt-key export C8E4D80D | sudo gpg --dearmour -o /usr/share/keyrings/authelia.gpg
|
||||
apt update
|
||||
apt install -y authelia
|
||||
yay -Sy
|
||||
yay --noconfirm -S authelia-bin wget
|
||||
|
||||
# ####################################
|
||||
# ##### Now we create the secrets
|
||||
|
|
@ -51,21 +46,6 @@ AUTHELIA_IDENTITY_PROVIDERS_OIDC_ISSUER_PRIVATE_KEY_FILE=/etc/authelia/.secrets/
|
|||
EOF
|
||||
chmod 600 -R /etc/authelia/.secrets/
|
||||
chmod 600 /etc/authelia/secrets
|
||||
(cat >/etc/systemd/system/authelia.service) <<EOF
|
||||
[Unit]
|
||||
Description=Authelia authentication and authorization server
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Environment=AUTHELIA_SERVER_DISABLE_HEALTHCHECK=true
|
||||
EnvironmentFile=/etc/authelia/secrets
|
||||
ExecStart=/usr/bin/authelia --config /etc/authelia/configuration.yml
|
||||
SyslogIdentifier=authelia
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
|
||||
# ####################################
|
||||
# ##### Now we create a user yaml
|
||||
|
|
@ -106,23 +86,3 @@ chmod 600 configuration.yml
|
|||
systemctl enable authelia
|
||||
systemctl start authelia
|
||||
|
||||
# ####################################
|
||||
# ##### Next we install NGINX
|
||||
# ##### It will probably not start
|
||||
# ##### without valid certificates
|
||||
# ##### we'll handle this later
|
||||
# ####################################
|
||||
|
||||
# install nginx
|
||||
apt install -y nginx
|
||||
# stop NGINX
|
||||
systemctl stop nginx
|
||||
# remove the default site
|
||||
rm /etc/nginx/sites-enabled/*
|
||||
# download the templates from Marc's cheat sheets
|
||||
wget https://raw.githubusercontent.com/onemarcfifty/cheat-sheets/main/templates/nginx/authelia/siteconf -O /etc/nginx/sites-available/authelia.conf
|
||||
wget https://raw.githubusercontent.com/onemarcfifty/cheat-sheets/main/templates/nginx/authelia/proxy-snippet -O /etc/nginx/snippets/proxy.conf
|
||||
wget https://raw.githubusercontent.com/onemarcfifty/cheat-sheets/main/templates/nginx/authelia/ssl-snippet -O /etc/nginx/snippets/ssl.conf
|
||||
# link back the authelia site as enabled to NGINX
|
||||
ln -s /etc/nginx/sites-available/authelia.conf /etc/nginx/sites-enabled/authelia.conf
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue