added add_location.sh
This commit is contained in:
14
bin/add_server.sh
Executable file
14
bin/add_server.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
read -p "Enter server name: " SERVER_NAME
|
||||
|
||||
mkdir .tmp
|
||||
cp ./config/nginx/template/http_location.conf .tmp/"$SERVER_NAME.conf"
|
||||
|
||||
# Replace placeholder SERVER_NAME in the copied file
|
||||
sed -i "s/SERVER_NAME/$SERVER_NAME/g" .tmp/"$SERVER_NAME.conf"
|
||||
mv .tmp/"$SERVER_NAME.conf" ./config/nginx/conf.d/
|
||||
|
||||
docker exec -it nginx-main nginx -s reload
|
||||
docker exec -it certbot certbot certaonly --nginx -d "$SERVER_NAME" -d "www.$SERVER_NAME"
|
||||
|
||||
0
bin/add_user.sh
Executable file
0
bin/add_user.sh
Executable file
Reference in New Issue
Block a user