pianod(1)

NAME
pianod - Pandora client daemon.

SYNOPSIS
pianod [-v] [-p port] [-P httpport] [-s httpsport] [-c clientdir] [-i startscript] [-n nobodyuser] [-g groups] [-u userdata]

DESCRIPTION
pianod is a daemon for Pandora, the online music service. pianod provides a TCP/IP line-oriented socket interface and a Websockets interface, each allowing multiple clients to connect for status and control. The application protocol (command/response set) is identical between line-oriented and Websocket connections.

The line-oriented protocol is accessible with nc(1) or telnet(1); a line session may be initiated on the HTTP port via the greeting "HELO pianod".

OPTIONS

-v  Report version and exit.

-p port
    The line port, default 4445. When set to 0, the line-oriented port is disabled.

-P port
    The HTTP port, default 4446 or - p port + 1. When set to 0, the HTTP server and Websockets are disabled.

-s port
    The HTTPS port, default 4447, - p port + 2, or - P port + 1. When set to 0, or when the required X509 certificate and keys are not present, the HTTPS server and secure websockets are disabled.

-c clientdir
    Location of files to be served via HTTP(S). The server only serves files (no server-side processing); this is intended to serve a web applet that will then communicate using Websockets. If this option is not set, HTTP GET and HEAD requests return errors.

-i startscript
    The script pianod executes on startup. The script is run with pianod administrator privileges, typically setting the Pandora user, audio preferences, and choosing a default station.

-n nobodyuser
    When invoked as root, the user to change to after startup. pianod assumes both the user and group id of the specified user. Defaults to nobody.

-g groups
    When invoked as root, a comma-separated list of supplementary groups to assume after startup. Defaults to the supplementary groups of the nobodyuser (see -n).

-u userdata
    The userdata/password file.

ENVIRONMENT

XDG_CONFIG_HOME
    Sets the location of configuration files. Files are stored in a pianod directory within this.

HOME
    If XDG_CONFIG_HOME is not set, and pianod is not running as root, then files are stored in $HOME/.config/pianod.

FILES
Configuration file location is set by XDG_CONFIG_HOME. If not set and pianod is running as root, filenames are prefixed with pianod and are stored in SYSCONFDIR which is usually /etc but may be pointed elsewhere when the package is configured. If not running as root, pianod uses $HOME/.config/pianod or failing that in a pianod subdirectory of the current directory.

startscript
    Commands executed with administrator privilege when pianod is launched.
passwd
    This XML file contains a list of pianod users, their passwords (encrypted), privileges and preferences.
x509-server.pem
    The X509 certificate used for HTTPS encryption.
x509-server-key.pem
    The X509 key used for HTTPS encryption

DIAGNOSTICS
To enable logging, use the -Z and -z flags:

-Z value
    Enables pianod logging for events indicated by value. Logs are sent to standard error, which may be redirected in usual manners. 0xfefd is a good value; see the code for specific flags.

-z value
    Like -Z but for Football events such as connects, disconnects, socket states and HTTP requests.

Logging preferences may also be changed at run-time via the SET [FOOTBALL] LOGGING FLAGS command.

AUTHOR
pianod was developed by Perette Barella <perette@deviousfish.com> and incorporates components from Lars-Dominik Braun and others. See the COPYING file for full information.

COPYRIGHT
pianod is Copyright the various authors and is available under the MIT license; see the COPYING file for full text.

SEE ALSO
piano(1), runmix(1), wsgw(1), football(3)