added add_location.sh

This commit is contained in:
2025-12-03 17:09:07 +00:00
parent e7128e8652
commit 8c976051ab
7 changed files with 101 additions and 14 deletions

16
setup.sh Normal file → Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Create a basic authentication file for Nginx
# 1. Check if htpasswd command is available
if ! command -v htpasswd &> /dev/null
then
echo "htpasswd could not be found, please install apache2-utils or httpd-tools."
sudo apt-get update && sudo apt-get install -y apache2-utils
fi
# 2. Create the password file with at least one user
echo "Create an admin user for basic authentication."
htpasswd -c ./data/auth/.htpasswd admin
echo "Basic authentication file created at ./data/auth/.htpasswd"