CLI_de - Psy-Virus/ampache GitHub Wiki
#CLI
Ampache ships with several scripts designed to be run from the command line which can be used to automate common management tasks. They are located in the bin/ directory of the distribution. To run them, you should be able to do php <path to script> [options...]
in your favourite terminal environment. There are other, unmaintained scripts in the bin directory that are not documented here and should be approached with caution.
Tool for updating catalogs. You might consider running it from cron
.
Usage: catalog_update.inc [CATALOG NAME] [-c|-v|-a|-g|-t]
Default behavior is to do all
-c Clean Catalogs
-v Verify Catalogs
-a Add to Catalogs
-g Gather Art
Start a specific channel and stream the same music to several clients. Ideal to host a web radio.
Usage: channel_run.inc [-c {CHANNEL ID}|-p {PORT}|-v]
-c {CHANNEL ID} Channel id to start
-p {PORT} Listening port, default get an available port automatically
-v Verbose
Given a file, this script will run through Ampache's metadata gathering process then print out both the raw and processed results. Very useful for troubleshooting metadata problems.
Run the Ampache WebSocket server (necessary for Broadcasts and remote control Web Player features).
Usage: websocket_run.inc [-p {PORT}|-v]
-p {PORT} Listening port, default 8100
-v Verbose
Usage: install_db.inc [options]
-U, --database-user MySQL Admin User
-P, --database-password MySQL Admin Password
-h, --database-host MySQL Hostname
-d, --database-name MySQL Database Name
-u, --ampache-database-user MySQL Application Username
-p, --ampache-database-pass MySQL Application Password
-w, --webpath Web path
-f, --force Force installation
With no options, displays whether the database requires schema updates. To actually do the updates, run it with -u
.
Usage: add_user.inc -u <username> [ -l <access level> ] [ -p <password ] [ -e <email> ] [ -w <website> ] [ -n <name> ]