UDP commands

The page describes the commands supported by Liberator’s administration UDP interface.

For information on activating the UDP interface, see UDP configuration.

For information on how to send UDP commands to liberator, see Sending UDP commands to Liberator.

shutdown <timespec> "<reason>"

Initiates a graceful (delayed) shutdown of Liberator. During a graceful shutdown, existing connections are still honoured, but no new client connections are accepted. Liberator will shutdown automatically either when all clients have disconnected, or at the conclusion of the grace period; whichever happens first.

StreamLink clients can subscribe to Liberator’s /SYSTEM/NOTIFY/STATE subject to be notified when a graceful shutdown has been initiated. For more information, see Liberator system subjects.

A graceful shutdown can also be initiated in two other ways:

  • Send a Linux SIGTERM signal to Liberator. Requires the configuration item sigterm-shutdown-options to be set to true.

  • Execute the Java Monitoring Extensions (JMX) operation 'shutdown' on the rttpd.server.liberator MBean in the Caplin Management Console.

Since: Liberator 7.1.1

Syntax: shutdown <timespec> "<reason>"

Parameter Type Description

timespec

integer/string

The date and time of the end of the grace period, specified as a relative timespec (number of seconds from 'now') or absolute timespec (a local date and time in the format %Y-%m-%dT%H:%M).

reason

string

Descriptive text to enter in Liberator’s log. The string must be quoted.

Examples:

  • shutdown 3600 "Shutting down for maintenance"

  • shutdown 2018-07-01T23:59:59 "Shutting down for maintenance"

If you send this UDP command from the command line using Liberator’s udpsend utility, then you must escape the quotes around the <reason> parameter to prevent the Bash shell from stripping them. For example:

$ udpsend -s liberator.example.com shutdown 3600 \"Graceful shutdown initiated\"

shutdown abort

Aborts a graceful shutdown. Has no effect if no graceful shutdown has been initiated.

You can also abort a graceful shutdown by executing the Java Management Extensions (JMX) operation 'shutdown-abort' on the rttp.server.liberator MBean in the Caplin Management Console.

Since: Liberator 7.1.1

Syntax: shutdown abort


See also: