[OpenIndiana-discuss] DLNA server

Hans J. Albertsson hans.j.albertsson at branneriet.se
Sun Mar 10 14:55:18 UTC 2013


Hmm...

I did this differently, I must say.

I set up a user and group both named serviio.

I extracted the linux distro under /usr/local and made it owned by 
serviio:serviio, and added a symlink /usr/local/serviio to point to the 
actual directory extracted into.

You can put a symlink in serviio's top dir to point to the real ffmpeg 
in lieu of editing the script.

I designed (simpler than you think) an SMF manifest for serviio, 
serviio.xml:

-----
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM 
"/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
         Created by Manifold
--><service_bundle type="manifest" name="serviio">

     <service name="application/UPnP-AV/serviio" type="service" version="1">

         <create_default_instance enabled="false"/>

         <single_instance/>

         <dependency name="network" grouping="require_all" 
restart_on="error" type="service">
             <service_fmri value="svc:/milestone/network:default"/>
         </dependency>

         <dependency name="filesystem" grouping="require_all" 
restart_on="error" type="service">
             <service_fmri value="svc:/system/filesystem/local"/>
         </dependency>

         <method_context>
             <method_credential user="serviio" group="serviio"/>
         </method_context>

         <exec_method type="method" name="start" 
exec="/usr/local/serviio/bin/serviio.sh" timeout_seconds="60"/>

         <exec_method type="method" name="stop" exec=":kill" 
timeout_seconds="60"/>

         <property_group name="startd" type="framework">
             <propval name="duration" type="astring" value="child"/>


             <propval name="ignore_error" type="astring" 
value="core,signal"/>
         </property_group>

         <property_group name="application" type="application">

         </property_group>


         <stability value="Evolving"/>

         <template>
             <common_name>
                 <loctext xml:lang="C">
                     serviio
                 </loctext>
             </common_name>
         </template>

     </service>

</service_bundle>
----------

I added the service to SMF using

pfexec svccfg import serviio.xml

and then

svcadm enable serviio

Whenever a new version appears, you disable serviio, drop the new 
version in a catalog next to the old one and recreate the symlink to 
point to the new one. Copy all from the old media library 
(~serviio/lib/* recursively ) into the new tree, possibly do some 
editing of the profiles in serviio/config, and enable the serviio 
service again.



For the console you have a choice of displaying it across the net or 
running it on a different machine altogether.

The Android console is much the easiest to use. 'nuff said!


On 2013-03-10 14:42, Edward Ned Harvey (openindiana) wrote:
>> From: Hans J. Albertsson [mailto:hans.j.albertsson at branneriet.se]
>> Sent: Saturday, March 09, 2013 2:28 PM
>>
>> Of course, there's NO serviio package in any std repository.
>> I thought you already had a serviio installed from the linux distro from
>> serviio.org??
> Sorry, my mistake.  I just pulled out my actual notes, and here's what I *actually* do:
>
>      adapted from http://wiki.serviio.org/doku.php?id=howto:solaris:install
>
>      sudo pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered
>      sudo pkg set-publisher -p http://pkg.openindiana.org/sfe
>
>      sudo pkg install ffmpeg
>
>      sudo mkdir /usr/local
>      cd /usr/local
>      sudo tar xzf serviio-1.1-linux.tar.gz
>      (Yes, I know that says linux.)
>
>      sudo chown -R eharvey:staff /usr/local/serviio-1.1
>
>      Get onto a GUI (vnc) as eharvey.
>          cd /usr/local/serviio-1.1
>          ./bin/serviio.sh &
>          ./bin/serviio-console.sh &
>
>      Icon appears in status tray. Right click it, open serviio console
>      Under "Network Settings" / "Bound IP address" enter your IP explicitly.
>
>      Under Library / Shared Folders, add something to share.
>
>      Create the script:  ~/bin/serviio.sh
> #!/usr/bin/bash
> cd /usr/local/serviio-1.1
> ./bin/serviio.sh &
> ./bin/serviio-console.sh &
>
>      Assuming you already have vnc set to launch as a smf service,
>      just add the serviio.sh script to System / Preferences / Startup Applications
>
>      Type "which ffmpeg" to get its location, and then edit JAVA_OPTS at the bottom of /usr/local/serviio-1.1/bin/serviio.sh and add
>          -Dffmpeg.location=/usr/bin/ffmpeg
>
>      Restart serviio.
>          ~/bin/serviio.sh
>
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss




More information about the OpenIndiana-discuss mailing list