Просмотр исходного кода

feat: add instructions for accessing the admin panel and configuring initial password in README files

Manuel 11 месяцев назад
Родитель
Сommit
9c3beeddab
2 измененных файлов с 56 добавлено и 0 удалено
  1. 28 0
      README.md
  2. 28 0
      README_es.md

+ 28 - 0
README.md

@@ -385,6 +385,34 @@ facebook.com,twitter.com,youtube.com,netflix.com,tiktok.com
   http://ip/hostname:5000
 ```
 
+## Accessing the Admin Panel
+
+To access the admin panel, you need to configure the initial password and restart the service.
+
+1. Edit the `.env` file using your preferred editor (vi, vim, or nano). Here's an example using nano:
+
+   ```bash
+   nano .env
+   ```
+
+   Add or modify the following line in the `.env` file:
+
+   ```bash
+   FIRST_PASSWORD="mipassword"
+   ```
+
+   Save the file and exit the editor (in nano, press Ctrl+X, then Y, then Enter).
+
+2. Restart the SquidStats service:
+
+   ```bash
+   sudo systemctl restart squidstats.service
+   ```
+
+3. Access the admin panel by visiting `http://your-ip:your-port/admin` in your browser.
+
+4. Log in with the username `admin` and the password you set in `FIRST_PASSWORD` (in this example, "mipassword").
+
 ### ⚠️ First Execution Alert ⚠️
 
 Warning: 🚨 The first execution may cause high CPU usage.

+ 28 - 0
README_es.md

@@ -296,6 +296,34 @@ facebook.com,twitter.com,youtube.com,netflix.com,tiktok.com
   http://ip/hostname:5000
 ```
 
+## Accediendo al Panel de Admin
+
+Para acceder al panel de admin, necesitas configurar la contraseña inicial y reiniciar el servicio.
+
+1. Edita el archivo `.env` usando tu editor preferido (vi, vim o nano). Aquí un ejemplo con nano:
+
+   ```bash
+   nano .env
+   ```
+
+   Agrega o modifica la siguiente línea en el archivo `.env`:
+
+   ```bash
+   FIRST_PASSWORD="mipassword"
+   ```
+
+   Guarda el archivo y sal del editor (en nano, presiona Ctrl+X, luego Y, luego Enter).
+
+2. Reinicia el servicio SquidStats:
+
+   ```bash
+   sudo systemctl restart squidstats.service
+   ```
+
+3. Accede al panel de admin visitando `http://tu-ip:tu-puerto/admin` en tu navegador.
+
+4. Inicia sesión con el usuario `admin` y la contraseña que configuraste en `FIRST_PASSWORD` (en este ejemplo, "mipassword").
+
 ### ⚠️ Alerta de Primera Ejecución ⚠️
 
 Advertencia: 🚨 La primera ejecución puede causar alto uso de CPU.