Skip to content

Commit b2ca894

Browse files
committed
Fix Typo and Thanks [@ichbinder](https://github.com/ichbinder) for the PR #7
1 parent dd390ff commit b2ca894

File tree

2 files changed

+49
-10
lines changed

2 files changed

+49
-10
lines changed

README.md

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ BASE_DIR="/path/nginx_proxy_script/data"
103103
-w ALLOW_WEBSOCKET_UPGRADE Allow WebSocket upgrade (true/false, default: true)
104104
-l CUSTOM_LOCATIONS Custom locations (JSON array of location objects)
105105
-a ADVANCED_CONFIG Advanced configuration (block of configuration settings)
106+
-y Automatic yes prompts, yes sir!
106107
107108
📦 Backup and Restore:
108109
--backup Backup all configurations to a file
@@ -149,18 +150,49 @@ BASE_DIR="/path/nginx_proxy_script/data"
149150
./nginx_proxy_manager_cli.sh --host-list
150151
./nginx_proxy_manager_cli.sh --host-ssl-enable 10
151152

153+
🤖 Automatic operations (no prompts):
154+
./nginx_proxy_manager_cli.sh -d example.com -i 192.168.1.10 -p 8080 -y
155+
./nginx_proxy_manager_cli.sh --host-delete 42 -y
156+
./nginx_proxy_manager_cli.sh --host-ssl-enable 10 -y
157+
158+
🔍 Information and Status:
159+
./nginx_proxy_manager_cli.sh --info # Show script configuration and status
160+
./nginx_proxy_manager_cli.sh --check-token # Verify token validity
161+
./nginx_proxy_manager_cli.sh --host-search domain.com # Search for a specific domain
162+
163+
🔄 Host Management:
164+
# Enable/Disable hosts
165+
./nginx_proxy_manager_cli.sh --host-enable 42
166+
./nginx_proxy_manager_cli.sh --host-disable 42
167+
168+
🛡️ Access Control Lists:
169+
./nginx_proxy_manager_cli.sh --list-access # List all access lists
170+
./nginx_proxy_manager_cli.sh --host-acl-enable 42,5 # Enable ACL ID 5 for host 42
171+
./nginx_proxy_manager_cli.sh --host-acl-disable 42 # Disable ACL for host 42
172+
173+
🔒 SSL Management:
174+
./nginx_proxy_manager_cli.sh --list-ssl-certificates # List all SSL certificates
175+
./nginx_proxy_manager_cli.sh --delete-cert domain.com # Delete certificate for domain
176+
177+
🔄 Update Specific Fields:
178+
# Update individual fields without recreating the entire host
179+
./nginx_proxy_manager_cli.sh --update-host 42 forward_scheme=https
180+
./nginx_proxy_manager_cli.sh --update-host 42 forward_port=8443
181+
./nginx_proxy_manager_cli.sh --update-host 42 block_exploits=true
182+
./nginx_proxy_manager_cli.sh --update-host 42 allow_websocket_upgrade=true
183+
152184
🔧 Advanced Example:
153185
./nginx_proxy_manager_cli.sh -d example.com -i 192.168.1.10 -p 8080 -a 'proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;'
154186

155187
🛡️ Custom Certificate:
156188
./nginx_proxy_manager_cli.sh --generate-cert example.com user@example.com
189+
# Note: This will generate a Let's Encrypt certificate only
157190

158191
🛡️ Custom locations:
159192
./nginx_proxy_manager_cli.sh -d example.com -i 192.168.1.10 -p 8080 -l '[{"path":"/api","forward_host":"192.168.1.11","forward_port":8081}]'
160193

161194
🔖 Full options:
162195
./nginx_proxy_manager_cli.sh -d example.com -i 192.168.1.10 -p 8080 -f https -c true -b true -w true -a 'proxy_set_header X-Real-IP $remote_addr;' -l '[{"path":"/api","forward_host":"192.168.1.11","forward_port":8081}]'
163-
164196
```
165197

166198
#### update
@@ -311,14 +343,20 @@ Host proxy info command `--host-show id`
311343
312344
313345
```
314-
315-
316-
![https://github.com/Erreur32/nginx-proxy-manager-API/blob/main/screen-nginx-proxy-default.png](https://github.com/Erreur32/nginx-proxy-manager-API/blob/main/screen-nginx-proxy-default.png)
317-
346+
318347
## TODO:
319348
- [x] add setting for ADVANCED configuration in npm `location / { ... }`
320349
- [x] Add documentation on certain functions
321350
- [x] ADD: a configuration function for Custom Locations
322-
- [x] Backup all settings from NPM
323-
- [ ] creation of ACCESS list
324-
- [ ] Restore Function not work properly , need to find FIX.
351+
- [x] Backup all settings from NPM
352+
- [x] Add automatic confirmation with -y parameter
353+
- [ ] Clean/minimize output when using -y parameter for better script integration
354+
- [ ] Creation of ACCESS list through CLI
355+
- [ ] Restore Function not working properly, need to find FIX
356+
- [ ] Add support for custom SSL certificates (currently only Let's Encrypt)
357+
- [ ] Add batch operations support (multiple hosts/operations at once)
358+
359+
## Credits & Thanks
360+
361+
Special thanks to:
362+
- [@ichbinder](https://github.com/ichbinder) for implementing the `-y` parameter for automatic confirmations

nginx_proxy_manager_cli.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ VERSION="2.5.9"
5656
# -w ALLOW_WEBSOCKET_UPGRADE Allow WebSocket upgrade (true/false, default: true)
5757
# -l CUSTOM_LOCATIONS Custom locations (JSON array of location objects)"
5858
# -a ADVANCED_CONFIG Advanced configuration (block of configuration settings)
59-
# -y Automatic yes to prompts
59+
# -y Automatic yes prompts !
6060
#
6161
# 📦 Backup and Restore:
6262
# --backup Backup all configurations to a file
@@ -274,6 +274,7 @@ usage() {
274274
echo -e " -w ALLOW_WEBSOCKET_UPGRADE Allow WebSocket upgrade (true/false, default: $(colorize_boolean $ALLOW_WEBSOCKET_UPGRADE))"
275275
echo -e " -l CUSTOM_LOCATIONS Custom locations (${COLOR_YELLOW}JSON array${CoR} of location objects)"
276276
echo -e " -a ADVANCED_CONFIG Advanced configuration (${COLOR_YELLOW}string${CoR})"
277+
echo -e " -y Automatic yes prompts !"
277278
echo ""
278279
echo -e " --info ℹ️ ${COLOR_YELLOW}Display${CoR} Script Variables Information"
279280
echo -e " --show-default 🔍 ${COLOR_YELLOW}Show${CoR} Default settings for creating hosts"
@@ -522,7 +523,7 @@ while getopts "d:i:p:f:c:b:w:a:l:y-:" opt; do
522523
w) ALLOW_WEBSOCKET_UPGRADE="$OPTARG" ;;
523524
a) ADVANCED_CONFIG="$OPTARG" ;;
524525
l) CUSTOM_LOCATIONS="$OPTARG" ;;
525-
y) AUTO_YES=true ;; # Neu: -y Flag für automatische "yes" Bestätigung
526+
y) AUTO_YES=true ;;
526527
-)
527528
case "${OPTARG}" in
528529
show-default) SHOW_DEFAULT=true ;;

0 commit comments

Comments
 (0)