-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
27 lines (20 loc) · 1.1 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Paso 2: Copiar el directorio 'headscale' a la carpeta de inicio del usuario actual
echo "Copiando el directorio 'headscale' al directorio personal..."
cp -r ./headscale ~/
# Paso 3: Solicitar entrada del usuario y modificar el archivo de configuración
echo "Por favor, escribe tu hostname (por ejemplo, 149.128.135.54:8080):"
read -p "your-host-name: " hostname_input
# Modificar el archivo de configuración con el hostname ingresado
echo "Modificando el archivo de configuración..."
sed -i "s|http://your-host-name:8080|http://$hostname_input|g" ~/headscale/config/config.yml
# Paso 4: Solicitar entrada del usuario para el base domain
echo "Por favor, escribe el base domain (por ejemplo, myuser.headscale.com):"
read -p "hostname.user.base_domain: " base_domain_input
# Modificar el archivo de configuración con el base domain ingresado
echo "Modificando el archivo de configuración..."
sed -i "s|user.headscale.com|$base_domain_input|g" ~/headscale/config/config.yml
# Paso 5: Ejecutar docker-compose up -d
echo "Ejecutando docker-compose up -d..."
docker-compose up -d
echo "Proceso completado."