Adjusted something in the description

This commit is contained in:
root
2025-11-07 18:00:36 +00:00
parent 3f8b8f66e5
commit 389f5b1046

View File

@@ -39,13 +39,16 @@ This approach is similar to how some services manage configuration (`sites-avail
- Make the script executable: - Make the script executable:
```bash ```bash
chmod +x /opt/hosts_config/generator-hosts.sh sudo chmod +x /opt/hosts_config/generator-hosts.sh
sudo ln -s /opt/hosts_config/generator-hosts.sh /usr/local/sbin/generator-hosts
``` ```
- Run it as `root` or with `sudo`: - Run it as `root` or with `sudo`:
```bash ```bash
sudo /opt/hosts_config/generator-hosts.sh -l sudo generator-hosts -l
``` ```
## Repository / folder layout ## Repository / folder layout
@@ -93,34 +96,34 @@ Run the script with one of the supported options (example path adjusted to where
```bash ```bash
# List enabled / disabled hosts # List enabled / disabled hosts
sudo /opt/hosts_config/generator-hosts.sh -l sudo generator-hosts -l
# Enable a host (interactive index selection) # Enable a host (interactive index selection)
sudo /opt/hosts_config/generator-hosts.sh -e sudo generator-hosts -e
# Disable a host (interactive index selection) # Disable a host (interactive index selection)
sudo /opt/hosts_config/generator-hosts.sh -d sudo generator-hosts -d
# Create a new host file interactively # Create a new host file interactively
sudo /opt/hosts_config/generator-hosts.sh -c sudo generator-hosts -c
# Regenerate /etc/hosts (writes file and creates backups) # Regenerate /etc/hosts (writes file and creates backups)
sudo /opt/hosts_config/generator-hosts.sh -r sudo generator-hosts -r
# Print a simulation / preview of what would be written # Print a simulation / preview of what would be written
sudo /opt/hosts_config/generator-hosts.sh -s sudo generator-hosts -s
# List local aliases # List local aliases
sudo /opt/hosts_config/generator-hosts.sh -hl sudo generator-hosts -hl
# Add a local alias # Add a local alias
sudo /opt/hosts_config/generator-hosts.sh -ha sudo generator-hosts -ha
# Remove a local alias (cannot remove 0.lhost) # Remove a local alias (cannot remove 0.lhost)
sudo /opt/hosts_config/generator-hosts.sh -hr sudo generator-hosts -hr
# Show main.conf and endfile.conf # Show main.conf and endfile.conf
sudo /opt/hosts_config/generator-hosts.sh -sw sudo generator-hosts -sw
``` ```
### Non-interactive / scripting notes ### Non-interactive / scripting notes