Add missing mkdir

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2024-12-22 21:53:26 -07:00 committed by GitHub
parent cdf3b5858c
commit c27d4499be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,11 +81,15 @@ sudo chmod 644 /etc/systemd/system/nginx.service.d/override.conf
sudo systemctl daemon-reload sudo systemctl daemon-reload
# Setup nginx-create-session-ticket-keys # Setup nginx-create-session-ticket-keys
mkdir -p /etc/nginx/session-ticket-keys
if grep -q rhel /etc/os-release; then if grep -q rhel /etc/os-release; then
unpriv curl -s https://raw.githubusercontent.com/TommyTran732/NGINX-Configs/main/scripts/nginx-create-session-ticket-keys-ramfs | sudo tee /usr/local/bin/nginx-create-session-ticket-keys > /dev/null unpriv curl -s https://raw.githubusercontent.com/TommyTran732/NGINX-Configs/main/scripts/nginx-create-session-ticket-keys-ramfs | sudo tee /usr/local/bin/nginx-create-session-ticket-keys > /dev/null
else else
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/nginx-create-session-ticket-keys | sudo tee /usr/local/bin/nginx-create-session-ticket-keys > /dev/null unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/nginx-create-session-ticket-keys | sudo tee /usr/local/bin/nginx-create-session-ticket-keys > /dev/null
fi fi
## Set the appropriate SELinux context for session ticket keys creation ## Set the appropriate SELinux context for session ticket keys creation
sudo semanage fcontext -a -t bin_t "$(realpath /usr/local/bin/nginx-create-session-ticket-keys)" sudo semanage fcontext -a -t bin_t "$(realpath /usr/local/bin/nginx-create-session-ticket-keys)"
sudo restorecon "$(realpath /usr/local/bin/nginx-create-session-ticket-keys)" sudo restorecon "$(realpath /usr/local/bin/nginx-create-session-ticket-keys)"