5. コマンドライン オプション
サーバを起動する際にコマンドラインから渡されるオプションには複数あります。以下の引数を指定して MediaTomb を起動すると短い概要が表示されます。
$ mediatomb --help
Note:
コマンドラインのオプションは設定ファイルに書かれている設定より優先されます。
5.1. IPアドレス
--ip or -i
サーバは与えられたIPアドレスにバインドします。現在複数のインターフェースにバインドする事はできませんので、0.0.0.0にバインドする事は不可能です。
5.2. インターフェース
--interface or -e
バインドするインターフェースを、例えばeth0、IPアドレスのかわりに指定できます。
5.3. ポート
--port or -p
メディアを提供したり、UPnPリクエストの為に、ウェブユーザインターフェースに使用するポートを指定します。最小値は49152です。もしこのオプションを省略すると、デフォルトポートが選択されます。しかし、この場合、サーバの再起動によりポートを変更する事ができます。
5.4. 設定ファイル
--config or -c
デフォルトでは、MediaTombは ~/.mediatomb ディレクトリにある config.xml という名前のファイルを探し出ます。このオプションを使用すれば名前と場所で設定ファイルを指定できます。ファイル名は、絶対ファイル名でなければなりません。
5.5. デーモンモード
--daemon or -d
バックグラウンドでサーバを稼動させます。MediaTombは SIGTERM、SIGINT でシャットダウンし、SIGHUP で再起動します。
5.6. ホームディレクトリ
--home or -m
代わりのホームディレクトリを指定します。デフォルトでは、MediaTomb はその環境のユーザのホームディレクトリを取得しようとします。それから、ユーザのホームディレクトリにある .mediatomb ディレクトリを探します。もし .mediatomb が見つかれば、デフォルトの設定ファイル(config.xml)を見つけようとします。もし見つからなければ、.mediatomb ディレクトリとデフォルトの設定ファイルの両方を作成します。
このオプションは2つの場合に便利です。ホームディレクトリが見つけられなかった場合(この場合、-c オプションを使用してMediaTombの設定ファイルを指定します。)、もしくは通常の場所ではないところに、新しい設定ファイルを作成したい場合(例えば、デーモンモードを設定する時)です。後者の場合は、セクション5.7「設定ディレクトリ」で記述される引数と共に使用することが出来ます。
5.7. 設定ディレクトリ
--cfgdir or -f
デフォルトの設定ディレクトリは、ユーザのホームと.mediatomb と同等のディレクトリ から構成されています。このオプションによって、デフォルトのディレクトリのネーミングを上書きする事ができます。通常の場所にないサーバを設定したいが、デフォルトの設定を利用したい場合に便利です。
5.8. PIDファイル
--pidfile or -P
サーバのプロセスIDが書かれたファイルを指定します。ファイル名は絶対ファイル名でなければなりません。
5.9. ユーザを指定して起動
--user or -u
指定されたユーザネームでMediaTombを起動します。デーモンモードで起動する際に便利です。
5.10. グループを指定して起動
--group or -g
指定したグループでMediaTombを起動します。デーモンモードで起動する際に便利です。
5.11. コンテンツを追加
--add or -a
またはユーザインターフェースなしで、指定したディレクトリやファイル名をデータベースに追加します。パスは絶対パスでなければなりません。もし、指定したパスがディレクトリの場合、再帰的に追加されていきます。もし、パスがファイルである場合には、指定されたファイルのみがインポートされます。
5.12. ファイルに吐き出すログ
--logfile or -l
標準出力にログメッセージを表示せずに、全てを指定したログに吐き出します。
5.13. コマンドラインの概要を表示する
--help or -h
利用可能なオプションの概要を表示します。
5. Command Line Options
There is a number of options that can be passed via command line upon server start up, for a short summary you can invoke MediaTomb with the following parameter:
$ mediatomb --help
Note:
the command line options override settings in the configuration file!
5.1. IP Address
--ip or -i
The server will bind to the given IP address, currently we can not bind to multiple interfaces so binding to 0.0.0.0 will not be possible.
5.2. Interface
--interface or -e
Interface to bind to, for example eth0, this can be specified instead of the ip address.
5.3. Port
--port or -p
Specify the server port that will be used for the web user interface, for serving media and for UPnP requests, minimum allowed value is 49152. If this option is omitted a default port will be chosen, however, in this case it is possible that the port will change upon server restart.
5.4. Configuration File
--config or -c
By default MediaTomb will search for a file named “config.xml” in the ~/.mediatomb directory. This option allows you to specify a config file by the name and location of your choice. The file name must be absolute.
5.5. Daemon Mode
--daemon or -d
Run the server in background, MediaTomb will shutdown on SIGTERM, SIGINT and restart on SIGHUP.
5.6. Home Directory
--home or -m
Specify an alternative home directory. By default MediaTomb will try to retrieve the users home directory from the environment, then it will look for a .mediatomb directory in users home. If .mediatomb was found we will try to find the default configuration file (config.xml), if not found we will create both, the .mediatomb directory and the default config file.
This option is useful in two cases: when the home directory can not be retrieved from the environment (in this case you could also use -c to point MediaTomb to your configuration file or when you want to create a new configuration in a non standard location (for example, when setting up daemon mode). In the latter case you can combine this parameter with the parameter described in Section 5.7, “Config Directory”
5.7. Config Directory
--cfgdir or -f
The default configuration directory is combined out of the users home and the default that equals to .mediatomb, this option allows you to override the default directory naming. This is useful when you want to setup the server in a nonstandard location, but want that the default configuration to be written by the server.
5.8. Write PID File
--pidfile or -P
Specify a file that will hold the server process ID, the filename must be absolute.
5.9. Run Under Different User Name
--user or -u
Run MediaTomb under the specified user name, this is especially useful in combination with the daemon mode.
5.10. Run Under Different Group
--group or -g
Run MediaTomb under the specified group, this is especially useful in combination with the daemon mode.
5.11. Add Content
--add or -a
Add the specified directory or file name to the database without UI interaction. The path must be absolute, if path is a directory then it will be added recursively. If path is a file, then only the given file will be imported.
5.12. Log To File
--logfile or -l
Do not output log messages to stdout, but redirect everything to a specified file.
5.13. Display Command Line Summary
--help or -h
Print a summary about the available command line options.
MediaTomb
MediaTomb の素敵なWebユーザインタフェースを備えたオープンソース(pyjamas)のUPnP MediaServerのですが、ストリームには、ホームネットワークを介してデジタルメディアの作成および編集できます/ cotton pyjamas UPnPの互換性のあるさまざまなデバイス上で時計に耳を傾ける。
新しいコメントの投稿