Je l'ai installé en tant que service sur mon serveur (sous hardy). Si ça intéresse quelqu'un...
Installation
A rajouter dans /etc/apt/sources.list
## kissdx : kissdx is a PC-Link clone for KiSS media players, based
deb http://ppa.launchpad.net/roderik/ubuntu hardy main
# deb-src http://ppa.launchpad.net/roderik/ubuntu hardy main
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F0EA351636DF354B2C5418A6BD563403AC3B0FF1
$ sudo apt-get -y install kissdx
$ sudo addgroup -system kissdx
$ sudo useradd -c "KiSS PC-Link Daemon" -d /var/lib/kissdx -g kissdx -m -s /bin/false kissdx
Fichiers de configuration
Voici mes fichiers de configuration pour le service (à créer) :
/etc/default/kissdx
# kissdx configuration file
# This file is loaded by /etc/init.d/kissdx.
KISSD_DIR=/var/lib/kissdx
KISSD_USER=kissdx
KISSD_GROUP=kissdx
KISSD_UMASK=0022
/etc/init.d/kissdx
#! /bin/sh
### BEGIN INIT INFO
# Provides: kissdx
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: Server for the KiSS PC-Link Daemon
# Description: kissdx is a simple daemon which enables a Linux or
# Windows box to stream videos, audio and pictures to
# a KiSS 15xx/5xx/6xx/16xx DVD/media player.
### END INIT INFO
# Author: tcherny86 <tcherny@free.fr>
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="KiSS PC-Link Daemon"
NAME=kissdx
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="--config=/etc/kissdx.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --chuid $KISSD_USER:$KISSD_GROUP --pidfile $PIDFILE --make-pidfile --background --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
:
Et mon fichier de configuration de kissdx :
/etc/kissdx.conf
#####################################################
# kissdx config file based on release v0.14
#####################################################
# Refer to the official documentation for details on configurating kissdx
# http://www.famille-kahn.com/kissdxmanual/
# paths for the media files (ending / not needed)
audiopath = /home/media/audio
videopath = /home/media/video
picturepath = /home/media/picture
# Path for persistent storage of info by kissdx.
# The [Recently used] feature and the picture caching feature will store data here.
# If option is omitted, kissdx will use picturepath, etc. for such storage.
#persistentstoragepath = /var/kissdx
persistentstoragepath = /var/lib/kissdx
# Path for storage of PID file
# Default: No pid file is created.
#pidfilepath = /var/run/kissdx.pid
# Allowed extensions for media files (comma separated, no spaces, case insensitive)
# Omit a setting to send ALL files to the player in the corresponding directory listing.
audiofileextensions = mp3,ogg,wma,wav
videofileextensions = mpg,mpeg,vob,avi,wmv,ts,mp4,divx
picturefileextensions = jpg,jpeg,png,bmp
# Allowed extensions for ISO image files (comma separated, no spaces, case insensitive)
# Without setting, only files with the .iso extension will be interpreted as ISO images.
isofileextensions = iso,img
# KML server will redirect incoming request to the URL :
kmlforwardurl = http://tinystocks.com/k/kiss.php
# Extend kissdx with triggers:
# MEDIA pre and post triggers are called before and after a streaming is selected
# on tcp network, it's a GET or SIZE command send.
# Those scripts take the filename as an argument and must
# return the new filename on stdout and a exit status of 0 to proceed.
# An non zero exit status cause the GET/SIZE to fail.
#pretrigger = /usr/local/bin/kissd-pretrigger
#posttrigger = /usr/local/bin/kissd-posttrigger
#
# DIRECTORY triggers
# Same as above, but called before and after listing a directory
#directorypretrigger = /usr/local/bin/kissd-directorypretrigger
#directoryposttrigger = /usr/local/bin/kissd-directoryposttrigger
# Subtitle file mapping
# kissdx will send up to 7 subtitle files that match the pattern after the colon.
# Pattern may contain variables that will be substituted with parts of the
# video filename/path:
# {name} = filename without extension (most likely to be used)
# {ext} = extension (not likely to be used)
# {path} = path (to the left of filename, no trailing slash.)
# If used in pattern, pattern must describe entire path.
# If not used, the path of the video file will be inserted before pattern.
# If this setting is omitted, a value of "*:{name}*.*" is assumed.
subtitlefilemapping = *:{name}*.*
# Maximum number of entires in recent list (30 is default, set to 0 to disable feature)
#max_recent_files = 30
# Alternate name of recent list folder. Default is [Recently used].
#recentlyusedfoldername = [Recently played]
# Character sets for conversion between server filenames, this configuration file (content),
# all playlist files (content) and client filenames.
# If a character set is not specified, no conversion will take place involving that entity.
# NOTE: To get additional character sets on an NSLU2: ipkg install gconv-modules
#server_character_set = CP850
#client_character_set = ISO-8859-1
config_character_set = ISO-8859-1
playlist_character_set = ISO-8859-1
# Picture scaling options (Screen width / height in pixels and optional zoom percentage)
# Specify both picturetargetwidth and picturetargetheight to enable picture scaling.
picturetargetwidth = 1280
picturetargetheight = 720
picturemaxzoompercent = 20
# Maximum size of scaled picture cache (max. no. of pictures in cache).
# Omit option or set = 0 to disable caching.
# Set to -1 for no limit.
picturecachesize = -1
# Minimum interval (in minutes) between each time the size of the scaled picture
# cache will be trimmed down to the maximum size defined by picturecachesize.
# Default is 5 minutes. Higher number = better performance.
# If set to 0, maximum cache size will be enforced every time a picture is viewed,
# potentially giving very bad performance if combined with a large picturecachesize.
#picturecachetrimminginterval = 5
# IP address to listen on, 0.0.0.0 for all. Default is all.
#listenaddress = 192.168.1.2
# A timeout period (seconds) can be configured to clean up waiting processes.
# Only needed if the KiSS player doesn't close all connections properly (which seems
# to happen when playing ogg Vorbis audio files on a DP-600 with 3.0.34 firmware.)
# No option or a value of 0 or less will disable timeout checking.
#networktimeoutinterval = 3600
# Specifying enablehiddenfilestext = gui-text will make available a pseudo-file in
# the Pictures root folder with this name: "gui-text.jpeg"
# When selecting this file on the player, the ability to view hidden content will be
# toggled on/off, and a picture describing the new state (on or off) displayed.
enablehiddenfilestext = Show it all
# If enablehiddenfilestext is specified, then enablehiddenfilesminutes can be
# specified to set a timeout period of n. Then n minutes after the viewing
# of hidden content was turned on, it will be automatically turned back off.
enablehiddenfilesminutes = 1
# Administration server settings: Listen for request on tcp port 8003 (recommended).
# Administration server is not activated by default for security reasons.
#adminserver_port = 8003
# Reload configuration from file(s) on receipt of UDP broadcast packet? (yes/no)
# Default is NO
#configautoload = yes
# dvdaccessmethod = { libdvdnav | libdvdread }
# Default is libdvdread
#dvdaccessmethod = libdvdnav
# renamefiletypes = sourcetype1:targettype1,sourcetype2:targettype2,etc...
# Use this option to have kissdx automatically rename certain file types,
# thereby tricking the KiSS player into detecting and playing such files.
#renamefiletypes = ts:mpg,wav:mp3
# List hidden entries (files or folders starting with a '.') in file system? (yes/no)
# Default is NO
#listhiddenentries = yes
# The signature of kissdx as shown on the KiSS player can be tailorded as needed.
# Default is {ShortHostName} - kissdx {Version},{VersionDate} {ConfigReloadStatus}
#serversignature = kissdx {Version} ({VersionDate}) @ {ShortHostName} {ConfigReloadStatus}
# Add a sequence number at the start of every file / folder name sent to the player
# to force a correct display sequence on DP-600/1600 players with new firmware (KNAS).
# Default is NO
#displaysequencenumbers = yes
# end of file
Création du service
$ sudo update-rc.d kissdx defaults