You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/CLI.md
+53-9Lines changed: 53 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Helpers
3
3
---
4
4
ApisCP provides a variety of command-line helpers that allow you to interact with your accounts. For example, you may want to put the panel in [headless mode](https://github.com/apisnetworks/apnscp-playbooks#toggling-headless-mode), which disables web-based access, automate account management, or even too run a command as another site.
5
5
6
-
All helpers live under `/usr/local/apnscp/bin`. All commands except for `cpcmd` must be run as root. `sudo su -` is a quick way to become root if you aren't already.
6
+
All helpers live under `{{ $themeConfig.APNSCP_ROOT }}/bin`. All commands except for `cpcmd` must be run as root. `sudo su -` is a quick way to become root if you aren't already.
7
7
8
8
::: tip
9
9
*Domain binaries: AddDomain, EditDomain, DeleteDomain, ActivateDomain, and SuspendDomain are covered in [Plans.md](Plans.md). ImportDomain and ExportDomain are covered in [Migrations.md](Migrations.md). This document covers other helpers.
@@ -156,39 +156,83 @@ get_site_id example.com
156
156
```
157
157
158
158
## Scripts
159
-
All ApisCP scripts are available under `{{ $themeConfig.APNSCP_ROOT }}/bin/scripts`. All scripts make use of the apnscp CLI framework and require invocation with `apnscp_php` to operate.
159
+
All ApisCP scripts are available under `{{ $themeConfig.APNSCP_ROOT }}/bin/scripts`. All scripts make use of the ApisCP CLI framework and require invocation with `apnscp_php` to operate.
160
160
161
-
### change_dns.php
161
+
### backup_dbs.php
162
+
163
+
Perform bulk database backups. This can be manually invoked before a [system backup](./Backups#triggering-database-backups) to ensure a fresh export of databases.
164
+
165
+
### ban_spam.sh
162
166
163
-
Bulk change DNS for an account.
167
+
Blocks any IP addresses with more than 100 open connections to a server.
164
168
165
169
### changelogparser.php
166
170
167
-
Summarize apnscp changes.
171
+
Summarize ApisCP changes from `git log`.
172
+
173
+
### change_dns.php
174
+
175
+
Bulk change DNS for an account. IPs may be changed for a single domain by specifying `-d DOMAIN` or for all accounts for which DNS is enabled by specifying `--all`.
176
+
177
+
```bash
178
+
cd /usr/local/apnscp/bin/scripts
179
+
# Reduce TTL for all domains to 15 seconds
180
+
./change_dns.php --all --ttl=15
181
+
182
+
# For all IPs that match "site:ip-address" change the IP to 45.12.23.4
PHP will be built with apnscp module requirements.
233
+
PHP will be built with ApisCP module requirements.
190
234
191
235
### build/httpd/apxs
192
-
General utility apxs wrapper to build modules specifically for apnscp. Installed modules will be placed under `sys/httpd/private/modules`. Unless the module conflicts with global Apache instance, modules can be used from `sys/httpd/modules`, which is a symlink to `/usr/lib64/httpd/modules`.
236
+
General utility apxs wrapper to build modules specifically for ApisCP. Installed modules will be placed under `sys/httpd/private/modules`. Unless the module conflicts with global Apache instance, modules can be used from `sys/httpd/modules`, which is a symlink to `/usr/lib64/httpd/modules`.
0 commit comments