added add_location.sh
This commit is contained in:
16
setup.sh
Normal file → Executable file
16
setup.sh
Normal file → Executable 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"
|
||||
|
||||
Reference in New Issue
Block a user