forked-daapd: add package

This commit is contained in:
coolsnowwolf 2024-11-15 22:53:02 +08:00
parent 5d263760ae
commit 3c2b3bd894
12 changed files with 851 additions and 0 deletions

60
net/mwol/Makefile Normal file
View File

@ -0,0 +1,60 @@
#
# Copyright (C) 2019 mleaf.org
# 微信公众号【WiFi物联网】
#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mwol
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Mleaf/mwol.git
PKG_SOURCE_DATE:=2021-08-20
PKG_SOURCE_VERSION:=5291e45b3baedd8bd38358bcd275ce35296df82e
PKG_MIRROR_HASH:=5dde8ddc828c02b642e37e4e9726ab6f50e39c982da9b9d0a8e2595387504f1b
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
PKG_MAINTAINER:=mleaf <mleaf90@gmail.com>
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/mwol
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libmosquitto-ssl +libopenssl +libpthread +luci-lib-json
TITLE:=MQTT Wake On Lan
URL:=http://www.mleaf.org
endef
define Package/mwol/description
Mwol is a project that uses mqtt to implement reverse proxy and
wake up the computer.
endef
define Package/mwol/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mwol $(1)/usr/sbin/mwol
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) files/mwol.config $(1)/etc/config/mwol
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) files/mwol.init $(1)/etc/init.d/mwol
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) files/mwol_config_json $(1)/usr/sbin/mwol_config_json
$(INSTALL_DIR) $(1)/usr/share/mwol/ssl
$(CP) files/ssl/* $(1)/usr/share/mwol/ssl/
endef
$(eval $(call BuildPackage,mwol))

View File

@ -0,0 +1,11 @@
config mwol 'mwol_conf'
option enable '0'
option hostname 'www.mleaf.org'
option port '1999'
option sslenable '1'
option cafile '/usr/share/mwol/ssl/ca.crt'
option crtfile '/usr/share/mwol/ssl/client.crt'
option keyfile '/usr/share/mwol/ssl/client.key'
option encryptionenable '0'

56
net/mwol/files/mwol.init Executable file
View File

@ -0,0 +1,56 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2019 www.mleaf.org. All rights reserved.
# 微信公众号【WiFi物联网】
START=99
STOP=10
USE_PROCD=1
PROG=/usr/sbin/mwol
generate_mwol_conf()
{
logger "Generate /tmp/mwol.json"
lua /usr/sbin/mwol_config_json > /tmp/mwol.json
}
start_service_real() {
local cfg="$1"
local enable
local id
config_get enable "$cfg" enable
config_get id "$cfg" id
if [ -z "$id" ]; then
mac=`cat /sys/class/net/eth0/address`
logger "mqtt id is not set to use eth0 by default: $mac"
uci set mwol.mwol_conf.id=$mac
uci commit mwol
fi
if [ "$enable" -eq 1 ]; then
generate_mwol_conf
procd_open_instance
procd_set_param command $PROG -c /tmp/mwol.json
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
fi
}
service_triggers() {
procd_add_reload_trigger "mwol"
}
start_service()
{
config_load mwol
config_foreach start_service_real mwol
}

View File

@ -0,0 +1,56 @@
#!/usr/bin/env lua
--Copyright (c) 2019 www.mleaf.org. All rights reserved.
--微信公众号【WiFi物联网】
ubus = require('ubus')
local json = require "luci.json"
local conn = ubus.connect()
if not conn then
error("Failed to connect to ubus")
end
local mwol_ubus = conn:call("uci", "get", {config = "mwol"})
local mwol_table = mwol_ubus["values"]
local mwol_conf = {}
local mwo_enable
function get_mwol_conf(mTable)
for key, val in pairs(mTable) do
if string.match(key, '%.[%a]*', 1) == nil then
if key == "enable" then
mwo_enable = val
elseif key == "sslenable" then
if val == "1" then
mwol_conf["ssl"] = true
else
mwol_conf["ssl"] = false
end
elseif key=="encryptionenable" then
if val == "1" then
mwol_conf["encryption"] = true
else
mwol_conf["encryption"] = false
end
elseif key == "port" then
mwol_conf[key] = tonumber(val)
else
mwol_conf[key] = val
end
end
end
end
for key, val in pairs(mwol_table) do
if key == "mwol_conf" then
get_mwol_conf(val)
end
end
jsonStr = json.encode(mwol_conf)
print(jsonStr)

16
net/mwol/files/ssl/ca.crt Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICljCCAX4CCQCKs4OCFSYhzjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQDDAJj
YTAeFw0yMDAxMDcwNDEwMTJaFw0zMDAxMDQwNDEwMTJaMA0xCzAJBgNVBAMMAmNh
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3LwOkCJ1MDajCRK4jTgf
0cnapRPOs6xZFru0NgHMY7R6hlmBk8asHJIM+B9c3hGqEYERkRTR586lUWiE1n/i
VTTa5kblEb48p9dDaeUHtGB5FYvJQDgpdyy+dbqgFs/LbZ4mngz0rBeY4ukxu3lX
Zcs2DOGYnZd2uun7TSd5k6276tjzljcVfPigBN0U1YMyhPv+vo66bYBH+QFBXgd+
8+Be5nCEY2IQjaeTbpobcnz1x9iyfrqDc1Xk+d+dnHoajdgIdWKgR6rTcKlMNwh+
SVz1zU1GmzUtD+dfpB2mc8f1G3J1bXA2n8Jt568KH6Gx8KvX6NXpvK+vHcmFTaDv
CQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAwJ8xvUtSEhYuFOGCZ1fWz1Q8lLtC6
tNARV4C+JmT63mBkwP2tHC5GjbgCQTtYA8bgiEAsZkYL7wDw4R6104xHVmpYSaoN
lZxSps2t7WfpwABzaHZaeIzlZ+7lkamLb5It9yAvJTEN2L3opdRFleumz+3mpouM
VjBN6g3xX1SUmPoWn8QW7NvK9KwZHdr6uALoZ8vGAaXg7OTZooHL4xlCyESLqnbA
p7Nr1iiq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eCI1249/3xPQzKCWscvv2hPW
vRUQMS+erfmSDxg8B5LOVqPXLagZ0QA33KkILZsCgYBEh+GkTrcmyIKU5z6k7uT2
+kc+JopYmgadUQGdK/T0q/uVhefqmxJLlJSxcDnxyLvApjXS8c8Pwulr8N3C5xMj
q18loA6duC721+rTyn37yfB0d/xBOLtSxokBedRWOETHupUmwQgIgsgHToE94oGw
4S7pzZfpZwJXDPdja6SU/wKBgQDLHUG5HwxZIicaX5MR0wRseiX5BDeGSYy5YH43
F3fp3MKDGnR8RBFqbLKPIzvCQ/lR5deMicGLK2NTNOK7P0dn1iOqeCSzePn9pcKC
ubVuTJlXgOOZOYZefMXaF4Gv+TaCE2Uh1hRR3XE7t6sNCJactrDBwMhwuq1+76jb
DwyPJQKBgQCGX/+wwPnAvmtaKu9EUegp2hbmPXqLCexGAME/npUn071CYRoXb1OM
+13f7zWxC+5AIbcbX1LC+GrafeJGT/9VPqivvntwU2PtxfdPJ+wGkLcV+10gxV2l
5+w86aMDefzlqvMCX6pp9SY8jtzYBYGhm5OFVQ4eRAkceHlpXtEf/w==
-----END RSA PRIVATE KEY-----

40
net/njitclient/Makefile Normal file
View File

@ -0,0 +1,40 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=njit8021xclient
PKG_BASE_VERSION:=2.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/bitdust/njit8021xclient.git
PKG_SOURCE_DATE:=2018-11-24
PKG_SOURCE_VERSION:=dd28c17f24275bbbf4c44504b832c0f1e6b9ae40
PKG_MIRROR_HASH:=66e4f20ceeceaed457657b60ec0b390aab0d7ff380b0abe749738b8f4aa23556
PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/njit8021xclient
SECTION:=net
CATEGORY:=Network
SUBMENU:=Campus Network
TITLE:=NJIT 802.1X client program
DEPENDS:=+libopenssl +libpcap
endef
define Package/njit8021xclient/description
802.1X client from Nanjing Institude of Technology, compatable with
H3C iNode 802.1X client. Support H3C/iNode's private authentication
protocol V7.10.
endef
define Package/njit8021xclient/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/njit-client $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,njit8021xclient))

59
net/scutclient/Makefile Normal file
View File

@ -0,0 +1,59 @@
#
# Copyright (C) 2016-2018 SCUT Router Term
#
# This is free software, licensed under the GNU Affero General Public License v3.
# See /COPYING for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=scutclient
PKG_BASE_VERSION:=3.1.3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/scutclient/scutclient.git
PKG_SOURCE_DATE:=2021-11-26
PKG_SOURCE_VERSION:=b265ca8ffea204bd1788b0addd42184496b8a118
PKG_MIRROR_HASH:=798b31809f59f614e76c629bce2ab2c22b5589dca820c4302bc2974e5ab777bd
PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
PKG_MAINTAINER:=Scutclient Project
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/scutclient
SECTION:=net
CATEGORY:=Network
SUBMENU:=Campus Network
TITLE:=SCUT Dr.com client
URL:=https://github.com/scutclient/scutclient
endef
define Package/scutclient/description
Support SCUT private authentication protocol.
endef
define Package/scutclient/conffiles
/etc/config/scutclient
endef
define Package/scutclient/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) $(PKG_BUILD_DIR)/openwrt/files/scutclient.config $(1)/etc/config/scutclient
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/scutclient.init $(1)/etc/init.d/scutclient
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/scutclient.hotplug $(1)/etc/hotplug.d/iface/99-scutclient
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scutclient $(1)/usr/bin
endef
$(eval $(call BuildPackage,scutclient))

View File

@ -0,0 +1,81 @@
#
# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=forked-daapd
PKG_VERSION:=27.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ejurgensen/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
PKG_HASH:=27294a893253d232161f4521fc42147e65324ce5a13fcf550b537100375277bb
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_INSTALL:=1
PKG_MAINTAINER:=Espen Jürgensen <espenjurgensen+openwrt@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/forked-daapd
SECTION:=sound
CATEGORY:=Sound
TITLE:=iTunes (DAAP) server for Apple Remote and AirPlay
URL:=https://github.com/ejurgensen/forked-daapd
DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
+libevent2 +libdaemon +libantlr3c +confuse +libopus +alsa-lib +libffmpeg-full \
+mxml +libavahi-client +sqlite3-cli +libplist +libcurl +libjson-c \
+libprotobuf-c +libgnutls +libsodium +libwebsockets-full $(ICONV_DEPENDS)
endef
define Package/forked-daapd/description
forked-daapd is a Linux/FreeBSD DAAP (iTunes), MPD (Music Player Daemon) and
RSP (Roku) media server. It has support for AirPlay speakers, Chromecast,
Apple Remote (and compatibles), MPD clients, internet radio and LastFM. It
does not support AirPlay/Chromecast video.
endef
define Package/forked-daapd/conffiles
/etc/forked-daapd.conf
endef
CONFIGURE_ARGS += \
--enable-itunes \
--enable-lastfm \
--enable-mpd \
--enable-chromecast \
--enable-verification \
--enable-webinterface \
--disable-spotify \
--with-libplist \
--with-libwebsockets-full \
--with-alsa \
--without-pulseaudio \
--without-libevent_pthreads
TARGET_CFLAGS += $(FPIC)
TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
define Package/forked-daapd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/forked-daapd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/forked-daapd.conf $(1)/etc/forked-daapd.conf
$(INSTALL_DIR) $(1)/usr/lib/forked-daapd
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/forked-daapd/* $(1)/usr/lib/forked-daapd/
$(INSTALL_DIR) $(1)/usr/share/forked-daapd/htdocs
$(CP) $(PKG_BUILD_DIR)/htdocs/* $(1)/usr/share/forked-daapd/htdocs/
#$(INSTALL_DIR) $(1)/etc/init.d
#$(INSTALL_BIN) ./files/forked-daapd.init $(1)/etc/init.d/forked-daapd
endef
$(eval $(call BuildPackage,forked-daapd))

View File

@ -0,0 +1,414 @@
# A quick guide to configuring forked-daapd:
#
# For regular use, the most important setting to configure is "directories",
# which should be the location of your media. Whatever user you have set as
# "uid" must have read access to this location. If the location is a network
# mount, please see the README.
#
# In all likelihood, that's all you need to do!
general {
# Username
# Make sure the user has read access to the library directories you set
# below, and full access to the databases, log and local audio
uid = "root"
# Database location
db_path = "/opt/forked-daapd/songs3.db"
# Log file and level
# Available levels: fatal, log, warning, info, debug, spam
logfile = "/var/log/forked-daapd.log"
loglevel = log
# Admin password for the web interface
# Note that access to the web interface from computers in
# "trusted_network" (see below) does not require password
# admin_password = ""
# Websocket port for the web interface.
# websocket_port = 3688
# Sets who is allowed to connect without authorisation. This applies to
# client types like Remotes, DAAP clients (iTunes) and to the web
# interface. Options are "any", "localhost" or the prefix to one or
# more ipv4/6 networks. The default is { "localhost", "192.168", "fd" }
# trusted_networks = { "localhost", "192.168", "fd" }
# Enable/disable IPv6
ipv6 = no
# Location of cache database
cache_path = "/var/forked-daapd-cache.db"
# DAAP requests that take longer than this threshold (in msec) get their
# replies cached for next time. Set to 0 to disable caching.
# cache_daap_threshold = 1000
# When starting playback, autoselect speaker (if none of the previously
# selected speakers/outputs are available)
# speaker_autoselect = no
# Most modern systems have a high-resolution clock, but if you are on an
# unusual platform and experience audio drop-outs, you can try changing
# this option
# high_resolution_clock = yes
}
# Library configuration
library {
# Name of the library as displayed by the clients (%h: hostname). If you
# change the name after pairing with Remote you may have to re-pair.
name = "My Music on %h"
# TCP port to listen on. Default port is 3689 (daap)
port = 3689
# Password for the library. Optional.
# password = ""
# Directories to index
directories = { "/opt/music" }
# Follow symlinks. Default: true.
# follow_symlinks = true
# Directories containing podcasts
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# podcasts. Eg. if you index /srv/music, and your podcasts are in
# /srv/music/Podcasts, you can set this to "/Podcasts".
# (changing this setting only takes effect after rescan, see the README)
podcasts = { "/Podcasts" }
# Directories containing audiobooks
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# audiobooks.
# (changing this setting only takes effect after rescan, see the README)
audiobooks = { "/Audiobooks" }
# Directories containing compilations (eg soundtracks)
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# compilations.
# (changing this setting only takes effect after rescan, see the README)
compilations = { "/Compilations" }
# Compilations usually have many artists, and sometimes no album artist.
# If you don't want every artist to be listed in artist views, you can
# set a single name which will be used for all compilation tracks
# without an album artist, and for all tracks in the compilation
# directories.
# (changing this setting only takes effect after rescan, see the README)
compilation_artist = "Various Artists"
# If your album and artist lists are cluttered, you can choose to hide
# albums and artists with only one track. The tracks will still be
# visible in other lists, e.g. songs and playlists. This setting
# currently only works in some remotes.
# hide_singles = false
# Internet streams in your playlists will by default be shown in the
# "Radio" library, like iTunes does. However, some clients (like
# TunesRemote+) won't show the "Radio" library. If you would also like
# to have them shown like normal playlists, you can enable this option.
# radio_playlists = false
# These are the default playlists. If you want them to have other names,
# you can set it here.
# name_library = "Library"
# name_music = "Music"
# name_movies = "Movies"
# name_tvshows = "TV Shows"
# name_podcasts = "Podcasts"
# name_audiobooks = "Audiobooks"
# name_radio = "Radio"
# Artwork file names (without file type extension)
# forked-daapd will look for jpg and png files with these base names
# artwork_basenames = { "artwork", "cover", "Folder" }
# Enable searching for artwork corresponding to each individual media
# file instead of only looking for album artwork. This is disabled by
# default to reduce cache size.
# artwork_individual = false
# File types the scanner should ignore
# Non-audio files will never be added to the database, but here you
# can prevent the scanner from even probing them. This might improve
# scan time. By default .db, .ini, .db-journal, .pdf and .metadata are
# ignored.
# filetypes_ignore = { ".db", ".ini", ".db-journal", ".pdf", ".metadata" }
# File paths the scanner should ignore
# If you want to exclude files on a more advanced basis you can enter
# one or more POSIX regular expressions, and any file with a matching
# path will be ignored.
# filepath_ignore = { "myregex" }
# Disable startup file scanning
# When forked-daapd starts it will do an initial file scan of your
# library (and then watch it for changes). If you are sure your library
# never changes while forked-daapd is not running, you can disable the
# initial file scan and save some system ressources. Disabling this scan
# may lead to forked-daapd's database coming out of sync with the
# library. If that happens read the instructions in the README on how
# to trigger a rescan.
# filescan_disable = false
# Should metadata from m3u playlists, e.g. artist and title in EXTINF,
# override the metadata we get from radio streams?
# m3u_overrides = false
# Should iTunes metadata override ours?
# itunes_overrides = false
# Should we import the content of iTunes smart playlists?
# itunes_smartpl = false
# Decoding options for DAAP clients
# Since iTunes has native support for mpeg, mp4a, mp4v, alac and wav,
# such files will be sent as they are. Any other formats will be decoded
# to raw wav. If forked-daapd detects a non-iTunes DAAP client, it is
# assumed to only support mpeg and wav, other formats will be decoded.
# Here you can change when to decode. Note that these settings have no
# effect on AirPlay.
# Formats: mp4a, mp4v, mpeg, alac, flac, mpc, ogg, wma, wmal, wmav, aif, wav
# Formats that should never be decoded
# no_decode = { "format", "format" }
# Formats that should always be decoded
# force_decode = { "format", "format" }
# Watch named pipes in the library for data and autostart playback when
# there is data to be read. To exclude specific pipes from watching,
# consider using the above _ignore options.
# pipe_autostart = true
# Enable automatic rating updates
# If enabled, rating is automatically updated after a song has either been
# played or skipped (only skipping to the next song is taken into account).
# The calculation is taken from the beets plugin "mpdstats" (see
# https://beets.readthedocs.io/en/latest/plugins/mpdstats.html).
# It consist of calculating a stable rating based only on the play- and
# skipcount and a rolling rating based on the current rating and the action
# (played or skipped). Both results are combined with a mix-factor of 0.75:
# new rating = 0.75 * stable rating + 0.25 * rolling rating)
# rating_updates = false
# Allows creating, deleting and modifying m3u playlists in the library directories.
# Only supported by the player web interface and some mpd clients
# Defaults to being disabled.
# allow_modifying_stored_playlists = false
# A directory in one of the library directories that will be used as the default
# playlist directory. forked-dapd creates new playlists in this directory if only
# a playlist name is provided (requires "allow_modify_stored_playlists" set to true).
# default_playlist_directory = ""
}
# Local audio output
audio {
# Name - used in the speaker list in Remote
nickname = "OpenWrt"
# Type of the output (alsa, pulseaudio, dummy or disabled)
# type = "alsa"
# For pulseaudio output, an optional server hostname or IP can be
# specified (e.g. "localhost"). If not set, connection is made via local
# socket.
# server = ""
# Audio PCM device name for local audio output - ALSA only
# card = "default"
# Mixer channel to use for volume control - ALSA only
# If not set, PCM will be used if available, otherwise Master.
# mixer = ""
# Mixer device to use for volume control - ALSA only
# If not set, the value for "card" will be used.
# mixer_device = ""
# Enable or disable audio resampling to keep local audio in sync with
# e.g. Airplay. This feature relies on accurate ALSA measurements of
# delay, and some devices don't provide that. If that is the case you
# are better off disabling the feature.
# sync_disable = false
# Here you can adjust when local audio is started relative to other
# speakers, e.g. Airplay. Negative values correspond to moving local
# audio ahead, positive correspond to delaying it. The unit is
# milliseconds. The offset must be between -1000 and 1000 (+/- 1 sec).
# offset_ms = 0
# To calculate what and if resampling is required, local audio delay is
# measured each second. After a period the collected measurements are
# used to estimate drift and latency, which determines if corrections
# are required. This setting sets the length of that period in seconds.
# adjust_period_seconds = 100
}
# ALSA device settings
# If you have multiple ALSA devices you can configure them individually via
# sections like the below. Make sure to set the "card name" correctly. See the
# README about ALSA for details. Note that these settings will override the ALSA
# settings in the "audio" section above.
#alsa "card name" {
# Name - used in the speaker list in Remote
# If not set, the card name will be used
# nickname = "Computer"
# Mixer channel to use for volume control
# If not set, PCM will be used if available, otherwise Master
# mixer = ""
# Mixer device to use for volume control
# If not set, the card name will be used
# mixer_device = ""
#}
# Pipe output
# Allows forked-daapd to output audio data to a named pipe
#fifo {
# nickname = "fifo"
# path = "/path/to/fifo"
#}
# AirPlay settings common to all devices
#airplay_shared {
# UDP ports used when airplay devices make connections back to forked-daapd
# (choosing specific ports may be helpful when running forked-daapd behind a firewall)
# control_port = 0
# timing_port = 0
#}
# AirPlay per device settings
# (make sure you get the capitalization of the device name right)
#airplay "My AirPlay device" {
# forked-daapd's volume goes to 11! If that's more than you can handle
# you can set a lower value here
# max_volume = 11
# Enable this option to exclude a particular AirPlay device from the
# speaker list
# exclude = false
# Enable this option to keep a particular AirPlay device in the speaker
# list and thus ignore mdns notifications about it no longer being
# present. The speaker will remain until restart of forked-daapd.
# permanent = false
# Some devices spuriously disconnect during playback, and based on the
# device type forked-daapd may attempt to reconnect. Setting this option
# overrides this so reconnecting is either always enabled or disabled.
# reconnect = false
# AirPlay password
# password = "s1kr3t"
#}
# Chromecast settings
# (make sure you get the capitalization of the device name right)
#chromecast "My Chromecast device" {
# Enable this option to exclude a particular device from the speaker
# list
# exclude = false
#}
# Spotify settings (only have effect if Spotify enabled - see README/INSTALL)
spotify {
# Directory where user settings should be stored (credentials)
# settings_dir = "/var/cache/forked-daapd/libspotify"
# Cache directory
# cache_dir = "/tmp"
# Set preferred bitrate for music streaming
# 0: No preference (default), 1: 96kbps, 2: 160kbps, 3: 320kbps
# bitrate = 0
# Your Spotify playlists will by default be put in a "Spotify" playlist
# folder. If you would rather have them together with your other
# playlists you can set this option to true.
# base_playlist_disable = false
# Spotify playlists usually have many artist, and if you don't want
# every artist to be listed when artist browsing in Remote, you can set
# the artist_override flag to true. This will use the compilation_artist
# as album artist for Spotify items.
# artist_override = false
# Similar to the different artists in Spotify playlists, the playlist
# items belong to different albums, and if you do not want every album
# to be listed when browsing in Remote, you can set the album_override
# flag to true. This will use the playlist name as album name for
# Spotify items. Notice that if an item is in more than one playlist,
# it will only appear in one album when browsing (in which album is
# random).
# album_override = false
}
# MPD configuration (only have effect if MPD enabled - see README/INSTALL)
mpd {
# TCP port to listen on for MPD client requests.
# Default port is 6600, set to 0 to disable MPD support.
# port = 6600
# HTTP port to listen for artwork requests (only supported by some MPD
# clients and will need additional configuration in the MPD client to
# work). Set to 0 to disable serving artwork over http.
# http_port = 0
# By default forked-daapd will - like iTunes - clear the playqueue if
# playback stops. Setting clear_queue_on_stop_disable to true will keep
# the playlist like MPD does. Note that some dacp clients do not show
# the playqueue if playback is stopped.
# clear_queue_on_stop_disable = false
}
# SQLite configuration (allows to modify the operation of the SQLite databases)
# Make sure to read the SQLite documentation for the corresponding PRAGMA
# statements as changing them from the defaults may increase the possibility of
# database corruptions! By default the SQLite default values are used.
sqlite {
# Cache size in number of db pages for the library database
# (SQLite default page size is 1024 bytes and cache size is 2000 pages)
# pragma_cache_size_library = 2000
# Cache size in number of db pages for the daap cache database
# (SQLite default page size is 1024 bytes and cache size is 2000 pages)
# pragma_cache_size_cache = 2000
# Sets the journal mode for the database
# DELETE (default), TRUNCATE, PERSIST, MEMORY, WAL, OFF
# pragma_journal_mode = DELETE
# Change the setting of the "synchronous" flag
# 0: OFF, 1: NORMAL, 2: FULL (default)
# pragma_synchronous = 2
# Number of bytes set aside for memory-mapped I/O for the library database
# (requires sqlite 3.7.17 or later)
# 0: disables mmap (default), any other value > 0: number of bytes for mmap
# pragma_mmap_size_library = 0
# Number of bytes set aside for memory-mapped I/O for the cache database
# (requires sqlite 3.7.17 or later)
# 0: disables mmap (default), any other value > 0: number of bytes for mmap
# pragma_mmap_size_cache = 0
# Should the database be vacuumed on startup? (increases startup time,
# but may reduce database size). Default is yes.
# vacuum = yes
}
# Streaming audio settings for remote connections (ie stream.mp3)
streaming {
# Sample rate, typically 44100 or 48000
# sample_rate = 44100
# Set the MP3 streaming bit rate (in kbps), valid options: 64 / 96 / 128 / 192 / 320
# bit_rate = 192
}

View File

@ -0,0 +1,15 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2014 OpenWrt.org
START=99
BIN=/usr/sbin/forked-daapd
PID=/var/run/forked-daapd.pid
SSD=start-stop-daemon
start() {
$SSD -p $PID -S -x $BIN -- -P $PID
}
stop() {
$SSD -p $PID -K -s SIGINT
}