Extending uShare with RC Scripts

Posted on November 19, 2007
Author: Sean Potter
Pages: 1 2 3
Tags: HTPC, Gentoo, uPnP

Let's start by opening a new file, /etc/conf.d/ushare, in your favorite text editor. In this file, we want to configure the options being passed to uShare when its rc-script is started. Let's create four variables, uNAME, uINT, uPORT, and uOPTS. uNAME is the name of the server, $HOSTNAME by default. uINT specifies the interface we're broadcasting on, as uShare currently only supports one interface per instance. uPORT specifies the port number to run uShare on, and uOPTS will hold any other options we decide to pass. Let's look at how my file is set up.
#/etc/conf.d/ushare

# name of the server
uNAME="$HOSTNAME"

# Interface to run uShare on
uINT="eth1"

# Port to run uShare on
uPORT="49152"

# Additional options, note that each shared folder must have it's own -c option.
uOPTS="-x -c /opt/music -c /opt/movies -n $HOSTNAME"

# Comment the above and uncomment the following for PS3 support
# uOPTS="-d -c /opt -n $HOSTNAME"
Simplistic, and yet efficient. Now we need to make our rc-script work with it.

Jump to page:

blog comments powered by Disqus