Manual Version 65309.36 at 2010/04/12 15:07:04
For suggestions regarding this manual contact: docs@4psa.com
Copyright © 2002-2010 Rack-Soft, Inc.
All rights reserved.
Distribution of this work or derivative of this work is prohibited unless prior written permission is obtained from the copyright holder.
4PSA is a Registered Trademark of Rack-Soft, Inc.
Linux is a Registered Trademark of Linus Torvalds.
All other trademarks and copyrights are property of their respective owners.
Table of Contents
![]() |
It will take about 20 minutes to an intermediate user to read this document and follow the steps highlighted here. |
The Command Line Interface (CLI) is a collection of scripts and binaries that have two main usage scenarios:
Experienced administrators can use the CLI to perform daily management tasks.
The CLI can be used as an alternative to the web-based interface because it offers quicker access to most of the objects in the 4PSA DNS Manager system. The utilities that can be accessed through the CLI use the 4PSA DNS Manager core functionality to create, manage, and delete objects like: clients, zones, remote updates, etc.
You can use the CLI utilities even if the
dnsmanager
process (i.e. the web-based interface) has
been stopped.
Developers of third-party applications can use the CLI to integrate their software with 4PSA DNS Manager.
Command line utilities can be used from the console but also in shell scripts. Third-party software can use these shell scripts in order to interact with the 4PSA DNS Manager system.
The CLI utilities require root
privileges to
operate.
Utility | Affected Object(s) |
---|---|
client.sh | Manage client details |
client_prefs.sh | Manage client permissions |
clear_logs.sh | Deletes outdated log entries |
suspend.sh | Disable expired accounts |
zone.sh | Manage DNS zones |
zone_prefs.sh | Add, remove and update records |
updateurl | Schedules jobs for updateurld daemon |
zonemng | Schedules jobs for zonemngd daemon |
srvmonitor | Monitors services |
dbdump | Creates a full backup of the database |
slavecat | Displays the content of the interrogated slave zone |
notifications.sh | Sends email notifications |
confsync | Saves active services in /etc/dnsmanager/monitoring.conf |
Description
Updateurld is a daemon that periodically imports the zones from remote update locations to the database.
Location: <DNSMANAGER_ROOT_D>/admin/sbin/
Usage:
updateurld [-X|--nodetach [-v|--verbose <level>]]
updateurld -V|--version | -h|--help
Options
Option | Description |
---|---|
<no option> | Force it to run in foreground. |
-v|--verbose | Prints verbosity messages. (if -X was also used) |
-V|--version | Displays updateurld version. |
-h|--help | Displays command line options. |
Description:
zonemngd is a daemon that periodically writes the zone from the database to named.conf and to the zone files on disk.
Location: <DNSMANAGER_ROOT_D>/admin/sbin/
Usage:
zonemngd [-X|--nodetach [-v|--verbose]]
zonemngd -V|--version | -h|--help
Options
Option | Description |
---|---|
<no option> | Launches as a daemon. |
-X|--nodetach | Force it to run in foreground. |
-v|--verbose | Prints verbosity messages. (if -X was also used). |
-V|--version | Displays zonemngd version. |
-h|--help | Displays command line options. |
Description
The purpose of the 4PSA DNS Manager Round Robin daemon (rrmonitd) is to automate the DNS RR disqualification and qualification when a resource associated with a resource record becomes unavailable / available again. By resource we understand a protocol that can be monitored for service availability, like: HTTP, SMTP or POP3.
Location: /usr/sbin/
Usage:
rrmonitd -V|--version | -h|--help | -c|--configuration
Options
Option | Description |
---|---|
-V|--version | Displays version information and exits. |
-h|--help | Displays a help message. |
-c|--configuration | Rereads the dnsmanager.conf configuration
file.
|
Description:
This script allows you to change client informations.
Location: <DNSMANAGER_ROOT_D>/bin/
Usage: client.sh command <login_name>
[options]
Argument | Parameter | Description |
---|---|---|
Available commands | ||
-c, --create | login_name | Creates a new client account |
-u, --update | login_name | Updates client account |
-r, --remove | login_name | Removes client account |
--info or -i | login_name | retrieves client information |
--on | login_name | enables client account |
--off | login_name | disables client account |
-h, --help | Displays this help page | |
Available options | ||
--name or -n | string | Contact name (required for creation) |
--loginor -l | login_name | Control panel login name (may be used only with update command) |
--password or -p | password | Control panel password (required for creation) |
--email or -m | string | E-mail address (required for creation) |
--company or -o | string | Company Name |
--phone or -e | number | Phone number |
--fax or -f | number | Fax number |
--addr or -a | string | Street |
--city or -t | string | City |
--state | string | US state |
--pcode or -d | string | Postal code |
--country or -y | string | Country |
--status or -s | true|false | turns client on/off (default: true) |
Description:
This script allows you to change client permissions.
Location: <DNSMANAGER_ROOT_D>/bin/
Usage: client_prefs.sh command <login_name>
[options]
Argument | Parameter | Description |
---|---|---|
Available commands: | ||
--update or -u | login_name | Updates client account |
--info or -i | login_name | Retrieves client information |
--help or -h | Displays this help page | |
Available options: | ||
--add_remote_url or -ar | true|false | Turns client add_remote_url option on/off (default: true) |
--modify_remote_url or -mr | true|false | Turns client modify_remote_url option on/off (default: true) |
--clean_url_zones or - cz | true|false | Turns client "Remove zones no longer present in update source" option on/off (default: true) |
--ignore_other_urls or - io | true|false | Turns client "Lock zones to an update source" option on/off (default: true) |
--add_dns_templates or - at | true|false | Turns client add_dns_templates option on/off (default: true) |
--zone_refresh or -zr | number | Refresh time for DNS Zones |
--retry_time or -rt | number | Retry time for DNS Zones |
--expire_time or -et | number | Expire time for DNS Zones |
--minimum_ttl or -mt | number | Minimum TTL for DNS Zones |
--default_ttl or -dt | number | Default TTL for DNS Zones |
--maximum_dns_zones or -zl | number | Limit number of DNS Zones (u is unlimited) |
--maximum_updateurl or -ul | number | Limit number of update locations (u is unlimited) |
--expiration_date or -exp | date(yyyy-mm-dd) | expiration date (u is unlimited) |
--forward_zone_management or -fwd | value |
value = 10 Manage forward DNS zones and records value = 20 Manage forward DNS records only value = 30 View forward DNS zones and records |
--reverse_zone_management or -inv | value |
value = 10 Manage reverse DNS zones and records value=20 Manage reverse DNS records only value = 30 View reverse DNS zones and records value=40 Forbid access to reverse DNS zones |
--warn_update or - wu | true|false | Turns client "Warn if an update from a location fails more than" option on/off (default: true) |
--e164_zone_management or -e164 | value |
value = 10 Manage E.164 DNS zones and records value=20 Manage E.164 DNS records only value = 30 View E.164 DNS zones and records value = 40 Forbid access to E164 DNS zones |
Description:
This script is used to delete logs based on the settings configured by the admin in the 4PSA DNS Manager interface in Settings > DNS Manager settings > Delete logs older than [X] days on a log level higher than [Y].
This script doesn't accept any parameters.
This script runs from Cron.
Description:
This script will disable expired accounts. This script is programmed to run every night.
Location: <DNSMANAGER_ROOT_D>/bin/
Description
This script allows you to manage DNS zones.
Location: <DNSMANAGER_ROOT_D>/bin/
Usage: zone.sh --command <zone_name>
[options]
Argument | Parameter | Description |
---|---|---|
Available commands | ||
--create or -c | Creates a new zone | |
--remove or -r | zone_name | Removes records from an existing zone_name |
--update or -u | zone_name | Updates SOA settings of an existing Master zone_name |
Available options: | ||
--user or -s | ||
user_login | ||
use user_login to create the zone under his account | ||
--from_template or -t | template_name | Use template_name client template to create the zone |
--from_template_global or -g | template_name | Use template_name global template to create the zone |
--template_ip or -ip | IP | Use IP in the template to create the zone (if it is required) |
--zone_type or -y | slave|master | Creates a zone of a specified type |
Description
This script allows you to add, remove and update records.
Location: <DNSMANAGER_ROOT_D>/bin/
Usage: zone_prefs.sh --command <zone_name>
[options]
Argument | Parameter | Description |
---|---|---|
Available commands | ||
--create or -c | zone_name | Create records on the zone_name |
--remove or -r | zone_name | Removes records from an existing zone_name |
--update or -u | zone_name | Updates SOA settings of an existing Master zone_name |
--help or -h | Displays this help page | |
Available options: | ||
--record_type or -t | A|AAAA|CNAME|NS|MX|PTR|TXT|SRV|NAPTR | The record type |
--record_host or -o | host | The record host |
--record_value or -v | value | The record value |
--record_opt or -p | opt | The record option (for PTR and MX records only) |
--record_status or -st | 0|1 | The record status (0 is disabled, 1 is enabled) |
--record_services or -srvcs | services | The record services (for NAPTR records only) |
--record_order or -ord | order | The record order (for NAPTR records only) |
--record_preference or -prf | preference | The record preference (for NAPTR records only) |
--record_search or -srch | search | The record search (for NAPTR records only) |
--record_replace or -rpl | replace | The record replace (for NAPTR records only) |
--case or -ca | 'i' or '' | The suffix of the replace field (for NAPTR records only) |
--record_flag or -flg | flag | The record flag (for NAPTR records only) |
--record_ttl or -ttl | ttl | The record TTL (for NAPTR and SRV records only) |
--record_service or -srv | service | The record service (for SRV records only) |
--record_protocol or -proto | protocol | The record protocol (for SRV records only) |
--record_priority or -prty | priority | The record priority (for SRV records only) |
--record_weight or -wgt | weight | The record weight (for SRV records only) |
--record_port or -prt | port | The record port (for SRV records only) |
--record_target or -tgt | target | The record target (for SRV records only) |
--transfer_ip or -s | ip | IP to allow transfer to (for master zones only) |
--master_ip or -m | ip | IP to allow transfer from (for slave zones only) |
Zone SOA options (-u): | ||
--zone_refresh or -zr | number | Refresh time for DNS Zone |
--retry_time or -rt | number | Retry time for DNS Zone |
--expire_time or -et | number | Expire time for DNS Zone |
--minimum_ttl or -mt | number | Minimum TTL for DNS Zone |
--default_ttl or -dt | number | Default TTL for DNS Zone |
Use parameter values embraced by quotes or double quotes
Description
updateurl schedules jobs for updateurld daemon. Do not relay on updateurl for error checking, updateurl exits WITHOUT waiting for job completion on the daemon.
Location: <DNSMANAGER_ROOT_D>/admin/sbin/
Usage:
updateurl [-v|--verbose | -q|--quiet]
updateurl -n|--now [-f|--force] [-C|--client <id>|"<id>[ <id2>[ ...]]"] [-v|--verbose | -q|--quiet]
updateurl -c|--config [-v|--verbose | -q|--quiet]
updateurl -k|--kill [-v|--verbose | -q|--quiet]
updateurl -V|--version | -h|--help
Options
Option | Description |
---|---|
<no option> | Checks updateurld, returns 0 or 1 based on daemon state. |
-n|--now | Tries to import zones from remote update locations immediately. |
-f|--force | Ignores the update schedule for remote update locations, forcing the update. |
-C|--client |
Updates the remote locations of the enumerated client IDs. Is added to --now along with --force. Otherwise it has no effect. |
-c|--config | Signals daemon to reread the configuration files. |
-k|--kill | Stops daemon after current job is completed. |
-v|--verbose | Print more output to the console. |
-q|--quiet | Do not print anything to stdout, critical messages go to stderr. |
-V|--version | Displays updateurl version. |
-h|--help | Displays command line options. |
Description:
zonemng schedules jobs for zonemngd daemon. Do not relay on zonemng for error checking, zonemng exists WITHOUT waiting for the job completion on the daemon.
Location: <DNSMANAGER_ROOT_D>/admin/sbin/
Usage:
zonemng [-v|--verbose | -q|--quiet]
zonemng -n|--now [-v|--verbose | -q|--quiet]
zonemng -r|--restore [-v|--verbose | -q|--quiet]
zonemng -c|--config [-v|--verbose | -q|--quiet]
zonemng -k|--kill [-v|--verbose | -q|--quiet]
zonemng -V|--version | -h|--help
Options
Option | Description |
---|---|
<no options> | Checks zonemngd, returns 0 or 1 based on demon state. |
n|--now | Tries to sync disk with database immediately and reload named. |
-r|--restore | Restores all zones from database to disk. |
c|--config | Signals daemon to reread the configuration files. |
-k|--kill | Stops daemon after current job is completed. |
-v|--verbose | Print more output to the console. |
-q|--quiet | Do not print anything to stdout, critical messages go to stderr. |
-V|--version | Displays zonemng version. |
-h|--help | Displays command line options. |
Description:
Monitors the services activated in the DNS Manager Settings section of the web based interface. srvmonitor activates the services found deactivated and sends email notification specified in the Send monitoring alerts to text box, located in the DNS Manager Settings section.
Usage:
/usr/bin/srvmonitor
Description:
Creates a full backup of the database every day. The backup is saved in DUMPS_D /var/lib/dnsmanager/dumps
Usage:
/usr/local/dnsmanager/admin/sbin/dbdump
Displays the content of the interrogated slave zone.
Usage:
/usr/local/dnsmanager/admin/sbin/slavecat -f slave_zone_name
Options
Option | Description |
---|---|
-f, --file | File to be displayed |
-V, --version | Display version number and exit |
-?, --help | Show this help message |
-h | Show this help message |
--usage | Displays brief usage message |
Description:
Sends email notifications on reaching limits or account expiration dates.
Usage:
/usr/local/dnsmanager/admin/sbin/notifications.sh
Description
Saves in /etc/dnsmanager/monitoring.conf the active services configured in the DNS Manager Settings page of the web based interface and the email address specified in the Send monitoring alerts to text box located in the same page.
Usage:
/usr/local/dnsmanager/admin/sbin/confsync
For online help and support please visit the below areas:
Development office:
Rack-Soft SRL |
DCL Office Building, 20-22 Bilciuresti Street, sector 1 |
Bucharest, 014012 |
ROMANIA |
Phone: 646-957-8997 (US), 021-3130165 (Romania) |
Fax: 270-638-0988 (US), 021-3130165 (Romania) |
E-mail: